mirror of https://github.com/icsharpcode/ILSpy.git
3 changed files with 658 additions and 78 deletions
@ -1,88 +1,670 @@ |
|||||||
using System; |
using System; |
||||||
namespace Reversi |
namespace Reversi |
||||||
{ |
{ |
||||||
public class AboutDialog : System.Windows.Forms.Form |
public class Board |
||||||
{ |
{ |
||||||
private System.Windows.Forms.PictureBox iconPictureBox; |
public static int Black; |
||||||
private System.Windows.Forms.Button okButton; |
public static int Empty; |
||||||
private System.Windows.Forms.Label titleLabel; |
public static int White; |
||||||
private System.Windows.Forms.Label versionLabel; |
private int blackCount; |
||||||
private System.Windows.Forms.Label copyrightLabel; |
private int whiteCount; |
||||||
private System.ComponentModel.Container components; |
private int emptyCount; |
||||||
protected virtual void Dispose(bool disposing) |
private int blackFrontierCount; |
||||||
|
private int whiteFrontierCount; |
||||||
|
private int blackSafeCount; |
||||||
|
private int whiteSafeCount; |
||||||
|
private System.Int32[,] squares; |
||||||
|
private System.Boolean[,] safeDiscs; |
||||||
|
public int BlackCount { |
||||||
|
} |
||||||
|
public int WhiteCount { |
||||||
|
} |
||||||
|
public int EmptyCount { |
||||||
|
} |
||||||
|
public int BlackFrontierCount { |
||||||
|
} |
||||||
|
public int WhiteFrontierCount { |
||||||
|
} |
||||||
|
public int BlackSafeCount { |
||||||
|
} |
||||||
|
public int WhiteSafeCount { |
||||||
|
} |
||||||
|
public void SetForNewGame() |
||||||
|
{ |
||||||
|
for (int i = 0; (i < 8); i = (i + 1)) { |
||||||
|
for (int j = 0; (j < 8); j = (j + 1)) { |
||||||
|
(@this.squares).Set(i, j, (IL__ldsfld(Empty))); |
||||||
|
(@this.safeDiscs).Set(i, j, 0); |
||||||
|
} |
||||||
|
} |
||||||
|
(@this.squares).Set(3, 3, (IL__ldsfld(White))); |
||||||
|
(@this.squares).Set(3, 4, (IL__ldsfld(Black))); |
||||||
|
(@this.squares).Set(4, 3, (IL__ldsfld(Black))); |
||||||
|
(@this.squares).Set(4, 4, (IL__ldsfld(White))); |
||||||
|
@this.UpdateCounts(); |
||||||
|
} |
||||||
|
public int GetSquareContents(int row, int col) |
||||||
{ |
{ |
||||||
if (!(!disposing)) { |
return (@this.squares).Get(row, col); |
||||||
if (!(!(@this.components))) { |
} |
||||||
(@this.components).Dispose(); |
public void MakeMove(int color, int row, int col) |
||||||
goto BasicBlock_4; |
{ |
||||||
|
(@this.squares).Set(row, col, color); |
||||||
|
for (int i = -1; (i <= 1); i = (i + 1)) { |
||||||
|
for (int j = -1; (j <= 1); j = (j + 1)) { |
||||||
|
if (!(i)) { |
||||||
|
if (!(!j)) { |
||||||
|
goto ConditionalNode_62; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_31; |
||||||
|
} |
||||||
|
} |
||||||
|
ConditionalNode_62: |
||||||
|
if (!(!@this.IsOutflanking(color, row, col, i, j))) { |
||||||
|
int k = (row + i); |
||||||
|
for (int l = (col + j);; l = (l + j)) { |
||||||
|
if (!((@this.squares).Get(k, l) == -color)) { |
||||||
|
goto BasicBlock_31; |
||||||
|
} |
||||||
|
(@this.squares).Set(k, l, color); |
||||||
|
k = (k + i); |
||||||
|
} |
||||||
|
} |
||||||
|
BasicBlock_31: |
||||||
|
} |
||||||
|
} |
||||||
|
@this.UpdateCounts(); |
||||||
|
} |
||||||
|
public bool HasAnyValidMove(int color) |
||||||
|
{ |
||||||
|
for (int i = 0; (i < 8); i = (i + 1)) { |
||||||
|
for (int j = 0; (j < 8); j = (j + 1)) { |
||||||
|
if (!(!@this.IsValidMove(color, i, j))) { |
||||||
|
return 1; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return 0; |
||||||
|
} |
||||||
|
public bool IsValidMove(int color, int row, int col) |
||||||
|
{ |
||||||
|
if (!((@this.squares).Get(row, col) == (IL__ldsfld(Empty)))) { |
||||||
|
return 0; |
||||||
|
} |
||||||
|
for (int i = -1; (i <= 1); i = (i + 1)) { |
||||||
|
for (int j = -1; (j <= 1); j = (j + 1)) { |
||||||
|
if (!(i)) { |
||||||
|
if (!(!j)) { |
||||||
|
goto ConditionalNode_130; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_102; |
||||||
|
} |
||||||
|
} |
||||||
|
ConditionalNode_130: |
||||||
|
if (!(!@this.IsOutflanking(color, row, col, i, j))) { |
||||||
|
return 1; |
||||||
|
} |
||||||
|
BasicBlock_102: |
||||||
|
} |
||||||
|
} |
||||||
|
return 0; |
||||||
|
} |
||||||
|
public int GetValidMoveCount(int color) |
||||||
|
{ |
||||||
|
int i = 0; |
||||||
|
for (int j = 0; (j < 8); j = (j + 1)) { |
||||||
|
for (int k = 0; (k < 8); k = (k + 1)) { |
||||||
|
if (!(!@this.IsValidMove(color, j, k))) { |
||||||
|
i = (i + 1); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return i; |
||||||
|
} |
||||||
|
private bool IsOutflanking(int color, int row, int col, int dr, int dc) |
||||||
|
{ |
||||||
|
int i = (row + dr); |
||||||
|
int j = (col + dc); |
||||||
|
Loop_185: |
||||||
|
for (;;) { |
||||||
|
if (!(i < 0)) { |
||||||
|
if (!(i >= 8)) { |
||||||
|
if (!(j < 0)) { |
||||||
|
if (!(j >= 8)) { |
||||||
|
if (!((@this.squares).Get(i, j) == -color)) { |
||||||
|
goto ConditionalNode_213; |
||||||
|
} |
||||||
|
i = (i + dr); |
||||||
|
j = (j + dc); |
||||||
|
goto Loop_185; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto ConditionalNode_213; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto ConditionalNode_213; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto ConditionalNode_213; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto ConditionalNode_213; |
||||||
|
} |
||||||
|
} |
||||||
|
ConditionalNode_213: |
||||||
|
if (!(i < 0)) { |
||||||
|
if (!(i > 7)) { |
||||||
|
if (!(j < 0)) { |
||||||
|
if (!(j > 7)) { |
||||||
|
if (!((i - dr) != row)) { |
||||||
|
if (!((j - dc) == col)) { |
||||||
|
goto ConditionalNode_231; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_179; |
||||||
|
} |
||||||
|
} |
||||||
|
ConditionalNode_231: |
||||||
|
if (!((@this.squares).Get(i, j) == color)) { |
||||||
|
goto BasicBlock_179; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_180; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_179; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_179; |
||||||
|
} |
||||||
} |
} |
||||||
else { |
else { |
||||||
goto BasicBlock_4; |
goto BasicBlock_179; |
||||||
} |
} |
||||||
} |
} |
||||||
BasicBlock_4: |
BasicBlock_179: |
||||||
@this.Dispose(disposing); |
return 0; |
||||||
|
BasicBlock_180: |
||||||
|
return 1; |
||||||
} |
} |
||||||
private void InitializeComponent() |
private void UpdateCounts() |
||||||
{ |
{ |
||||||
System.Resources.ResourceManager V_0 = (new System.Resources.ResourceManager(Type.GetTypeFromHandle((typeof(Reversi.AboutDialog).TypeHandle)))); |
@this.blackCount = 0; |
||||||
@this.iconPictureBox = (new System.Windows.Forms.PictureBox()); |
@this.whiteCount = 0; |
||||||
@this.titleLabel = (new System.Windows.Forms.Label()); |
@this.emptyCount = 0; |
||||||
@this.versionLabel = (new System.Windows.Forms.Label()); |
@this.blackFrontierCount = 0; |
||||||
@this.okButton = (new System.Windows.Forms.Button()); |
@this.whiteFrontierCount = 0; |
||||||
@this.copyrightLabel = (new System.Windows.Forms.Label()); |
@this.whiteSafeCount = 0; |
||||||
@this.SuspendLayout(); |
@this.blackSafeCount = 0; |
||||||
(@this.iconPictureBox).Location = (new System.Drawing.Point(77, 56)); |
bool V_2 = 1; |
||||||
(@this.iconPictureBox).Name = "iconPictureBox"; |
Loop_287: |
||||||
(@this.iconPictureBox).Size = (new System.Drawing.Size(96, 96)); |
for (; (V_2);) { |
||||||
(@this.iconPictureBox).TabIndex = 0; |
V_2 = 0; |
||||||
(@this.iconPictureBox).TabStop = 0; |
for (int i = 0;; i = (i + 1)) { |
||||||
(@this.titleLabel).AutoSize = 1; |
if (!(i < 8)) { |
||||||
(@this.titleLabel).Font = (new System.Drawing.Font("Microsoft Sans Serif", 8.25f, 1, 3, 0)); |
goto Loop_287; |
||||||
(@this.titleLabel).Location = (new System.Drawing.Point(103, 16)); |
} |
||||||
(@this.titleLabel).Name = "titleLabel"; |
for (int j = 0; (j < 8); j = (j + 1)) { |
||||||
(@this.titleLabel).Size = (new System.Drawing.Size(44, 16)); |
if (!((@this.squares).Get(i, j) == (IL__ldsfld(Empty)))) { |
||||||
(@this.titleLabel).TabIndex = 0; |
if (!((@this.safeDiscs).Get(i, j))) { |
||||||
(@this.titleLabel).Text = "Reversi"; |
if (!(@this.IsOutflankable(i, j))) { |
||||||
(@this.titleLabel).TextAlign = 32; |
(@this.safeDiscs).Set(i, j, 1); |
||||||
(@this.versionLabel).AutoSize = 1; |
V_2 = 1; |
||||||
(@this.versionLabel).Location = (new System.Drawing.Point(95, 32)); |
goto BasicBlock_240; |
||||||
(@this.versionLabel).Name = "versionLabel"; |
} |
||||||
(@this.versionLabel).Size = (new System.Drawing.Size(61, 16)); |
else { |
||||||
(@this.versionLabel).TabIndex = 1; |
goto BasicBlock_240; |
||||||
(@this.versionLabel).Text = "Version 2.0"; |
} |
||||||
(@this.versionLabel).TextAlign = 32; |
} |
||||||
(@this.okButton).DialogResult = 1; |
else { |
||||||
(@this.okButton).Location = (new System.Drawing.Point(88, 192)); |
goto BasicBlock_240; |
||||||
(@this.okButton).Name = "okButton"; |
} |
||||||
(@this.okButton).TabIndex = 3; |
} |
||||||
(@this.okButton).Text = "OK"; |
BasicBlock_240: |
||||||
(@this.copyrightLabel).AutoSize = 1; |
} |
||||||
(@this.copyrightLabel).Location = (new System.Drawing.Point(36, 160)); |
} |
||||||
(@this.copyrightLabel).Name = "copyrightLabel"; |
} |
||||||
(@this.copyrightLabel).Size = (new System.Drawing.Size(178, 16)); |
i = 0; |
||||||
(@this.copyrightLabel).TabIndex = 2; |
for (; (i < 8); i = (i + 1)) { |
||||||
(@this.copyrightLabel).Text = "Copyright 2003-2005 by Mike Hall."; |
j = 0; |
||||||
(@this.copyrightLabel).TextAlign = 32; |
for (; (j < 8); j = (j + 1)) { |
||||||
@this.AcceptButton = (@this.okButton); |
bool V_5 = 0; |
||||||
@this.AutoScaleBaseSize = (new System.Drawing.Size(5, 13)); |
if (!((@this.squares).Get(i, j) == (IL__ldsfld(Empty)))) { |
||||||
@this.CancelButton = (@this.okButton); |
for (int k = -1;; k = (k + 1)) { |
||||||
@this.ClientSize = (new System.Drawing.Size(250, 224)); |
if (!(k <= 1)) { |
||||||
@this.ControlBox = 0; |
goto ConditionalNode_375; |
||||||
@this.Controls.Add((@this.copyrightLabel)); |
} |
||||||
@this.Controls.Add((@this.versionLabel)); |
for (int l = -1; (l <= 1); l = (l + 1)) { |
||||||
@this.Controls.Add((@this.titleLabel)); |
if (!(k)) { |
||||||
@this.Controls.Add((@this.okButton)); |
if (!(!l)) { |
||||||
@this.Controls.Add((@this.iconPictureBox)); |
goto ConditionalNode_351; |
||||||
@this.FormBorderStyle = 3; |
} |
||||||
@this.Icon = ((System.Drawing.Icon)(V_0.GetObject("$this.Icon"))); |
else { |
||||||
@this.MaximizeBox = 0; |
goto BasicBlock_258; |
||||||
@this.MinimizeBox = 0; |
} |
||||||
@this.Name = "AboutDialog"; |
} |
||||||
@this.ShowInTaskbar = 0; |
ConditionalNode_351: |
||||||
@this.StartPosition = 4; |
if (!((i + k) < 0)) { |
||||||
@this.Text = "About Reversi"; |
if (!((i + k) >= 8)) { |
||||||
@this.ResumeLayout(0); |
if (!((j + l) < 0)) { |
||||||
|
if (!((j + l) >= 8)) { |
||||||
|
if (!((@this.squares).Get((i + k), (j + l)) != (IL__ldsfld(Empty)))) { |
||||||
|
V_5 = 1; |
||||||
|
goto BasicBlock_258; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_258; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_258; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_258; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_258; |
||||||
|
} |
||||||
|
} |
||||||
|
BasicBlock_258: |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
ConditionalNode_375: |
||||||
|
if (!((@this.squares).Get(i, j) != (IL__ldsfld(Black)))) { |
||||||
|
IL__dup(@this); |
||||||
|
object expr123 = expr122.blackCount; |
||||||
|
int expr129 = expr123 + 1; |
||||||
|
expr122.blackCount = expr129; |
||||||
|
if (!(!V_5)) { |
||||||
|
IL__dup(@this); |
||||||
|
object expr135 = expr134.blackFrontierCount; |
||||||
|
int expr13B = expr135 + 1; |
||||||
|
expr134.blackFrontierCount = expr13B; |
||||||
|
} |
||||||
|
if (!(!(@this.safeDiscs).Get(i, j))) { |
||||||
|
IL__dup(@this); |
||||||
|
object expr152 = expr151.blackSafeCount; |
||||||
|
int expr158 = expr152 + 1; |
||||||
|
expr151.blackSafeCount = expr158; |
||||||
|
goto BasicBlock_273; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_273; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
if (!((@this.squares).Get(i, j) != (IL__ldsfld(White)))) { |
||||||
|
IL__dup(@this); |
||||||
|
object expr176 = expr175.whiteCount; |
||||||
|
int expr17C = expr176 + 1; |
||||||
|
expr175.whiteCount = expr17C; |
||||||
|
if (!(!V_5)) { |
||||||
|
IL__dup(@this); |
||||||
|
object expr188 = expr187.whiteFrontierCount; |
||||||
|
int expr18E = expr188 + 1; |
||||||
|
expr187.whiteFrontierCount = expr18E; |
||||||
|
} |
||||||
|
if (!(!(@this.safeDiscs).Get(i, j))) { |
||||||
|
IL__dup(@this); |
||||||
|
object expr1A5 = expr1A4.whiteSafeCount; |
||||||
|
int expr1AB = expr1A5 + 1; |
||||||
|
expr1A4.whiteSafeCount = expr1AB; |
||||||
|
goto BasicBlock_273; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_273; |
||||||
|
} |
||||||
|
} |
||||||
|
IL__dup(@this); |
||||||
|
object expr1B5 = expr1B4.emptyCount; |
||||||
|
int expr1BB = expr1B5 + 1; |
||||||
|
expr1B4.emptyCount = expr1BB; |
||||||
|
} |
||||||
|
BasicBlock_273: |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
private bool IsOutflankable(int row, int col) |
||||||
|
{ |
||||||
|
int i = (@this.squares).Get(row, col); |
||||||
|
bool V_3 = 0; |
||||||
|
bool V_5 = 0; |
||||||
|
bool V_4 = 0; |
||||||
|
bool V_6 = 0; |
||||||
|
int k = 0; |
||||||
|
Loop_506: |
||||||
|
for (;;) { |
||||||
|
if (!(k >= col)) { |
||||||
|
if (!(!V_3)) { |
||||||
|
goto BasicBlock_404; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(row, k) != (IL__ldsfld(Empty)))) { |
||||||
|
V_3 = 1; |
||||||
|
goto BasicBlock_401; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(row, k) != i)) { |
||||||
|
if (!((@this.safeDiscs).Get(row, k))) { |
||||||
|
goto BasicBlock_400; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_401; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_400; |
||||||
|
} |
||||||
|
BasicBlock_401: |
||||||
|
k = (k + 1); |
||||||
|
goto Loop_506; |
||||||
|
BasicBlock_400: |
||||||
|
V_5 = 1; |
||||||
|
goto BasicBlock_401; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_404; |
||||||
|
} |
||||||
|
} |
||||||
|
BasicBlock_404: |
||||||
|
k = (col + 1); |
||||||
|
Loop_515: |
||||||
|
for (;;) { |
||||||
|
if (!(k >= 8)) { |
||||||
|
if (!(!V_4)) { |
||||||
|
goto BasicBlock_413; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(row, k) != (IL__ldsfld(Empty)))) { |
||||||
|
V_4 = 1; |
||||||
|
goto BasicBlock_410; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(row, k) != i)) { |
||||||
|
if (!((@this.safeDiscs).Get(row, k))) { |
||||||
|
goto BasicBlock_409; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_410; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_409; |
||||||
|
} |
||||||
|
BasicBlock_410: |
||||||
|
k = (k + 1); |
||||||
|
goto Loop_515; |
||||||
|
BasicBlock_409: |
||||||
|
V_6 = 1; |
||||||
|
goto BasicBlock_410; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_413; |
||||||
|
} |
||||||
|
} |
||||||
|
BasicBlock_413: |
||||||
|
if (!V_3) goto BasicBlock_415; |
||||||
|
if (V_4) goto BasicBlock_419; |
||||||
|
BasicBlock_415: |
||||||
|
if (!V_3) goto BasicBlock_417; |
||||||
|
if (V_6) goto BasicBlock_419; |
||||||
|
BasicBlock_417: |
||||||
|
if (!V_5) goto BasicBlock_420; |
||||||
|
if (!V_4) goto BasicBlock_420; |
||||||
|
BasicBlock_419: |
||||||
|
return 1; |
||||||
|
BasicBlock_420: |
||||||
|
V_3 = 0; |
||||||
|
V_4 = 0; |
||||||
|
V_5 = 0; |
||||||
|
V_6 = 0; |
||||||
|
int j = 0; |
||||||
|
Loop_531: |
||||||
|
for (;;) { |
||||||
|
if (!(j >= row)) { |
||||||
|
if (!(!V_3)) { |
||||||
|
goto BasicBlock_429; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(j, col) != (IL__ldsfld(Empty)))) { |
||||||
|
V_3 = 1; |
||||||
|
goto BasicBlock_426; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(j, col) != i)) { |
||||||
|
if (!((@this.safeDiscs).Get(j, col))) { |
||||||
|
goto BasicBlock_425; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_426; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_425; |
||||||
|
} |
||||||
|
BasicBlock_426: |
||||||
|
j = (j + 1); |
||||||
|
goto Loop_531; |
||||||
|
BasicBlock_425: |
||||||
|
V_5 = 1; |
||||||
|
goto BasicBlock_426; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_429; |
||||||
|
} |
||||||
|
} |
||||||
|
BasicBlock_429: |
||||||
|
j = (row + 1); |
||||||
|
Loop_540: |
||||||
|
for (;;) { |
||||||
|
if (!(j >= 8)) { |
||||||
|
if (!(!V_4)) { |
||||||
|
goto BasicBlock_438; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(j, col) != (IL__ldsfld(Empty)))) { |
||||||
|
V_4 = 1; |
||||||
|
goto BasicBlock_435; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(j, col) != i)) { |
||||||
|
if (!((@this.safeDiscs).Get(j, col))) { |
||||||
|
goto BasicBlock_434; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_435; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_434; |
||||||
|
} |
||||||
|
BasicBlock_435: |
||||||
|
j = (j + 1); |
||||||
|
goto Loop_540; |
||||||
|
BasicBlock_434: |
||||||
|
V_6 = 1; |
||||||
|
goto BasicBlock_435; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_438; |
||||||
|
} |
||||||
|
} |
||||||
|
BasicBlock_438: |
||||||
|
if (!V_3) goto BasicBlock_440; |
||||||
|
if (V_4) goto BasicBlock_444; |
||||||
|
BasicBlock_440: |
||||||
|
if (!V_3) goto BasicBlock_442; |
||||||
|
if (V_6) goto BasicBlock_444; |
||||||
|
BasicBlock_442: |
||||||
|
if (!V_5) goto BasicBlock_445; |
||||||
|
if (!V_4) goto BasicBlock_445; |
||||||
|
BasicBlock_444: |
||||||
|
return 1; |
||||||
|
BasicBlock_445: |
||||||
|
V_3 = 0; |
||||||
|
V_4 = 0; |
||||||
|
V_5 = 0; |
||||||
|
V_6 = 0; |
||||||
|
j = (row - 1); |
||||||
|
k = (col - 1); |
||||||
|
Loop_557: |
||||||
|
for (;;) { |
||||||
|
if (!(j < 0)) { |
||||||
|
if (!(k < 0)) { |
||||||
|
if (!(!V_3)) { |
||||||
|
goto BasicBlock_455; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(j, k) != (IL__ldsfld(Empty)))) { |
||||||
|
V_3 = 1; |
||||||
|
goto BasicBlock_451; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(j, k) != i)) { |
||||||
|
if (!((@this.safeDiscs).Get(j, k))) { |
||||||
|
goto BasicBlock_450; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_451; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_450; |
||||||
|
} |
||||||
|
BasicBlock_451: |
||||||
|
j = (j - 1); |
||||||
|
k = (k - 1); |
||||||
|
goto Loop_557; |
||||||
|
BasicBlock_450: |
||||||
|
V_5 = 1; |
||||||
|
goto BasicBlock_451; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_455; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_455; |
||||||
|
} |
||||||
|
} |
||||||
|
BasicBlock_455: |
||||||
|
j = (row + 1); |
||||||
|
k = (col + 1); |
||||||
|
Loop_567: |
||||||
|
for (;;) { |
||||||
|
if (!(j >= 8)) { |
||||||
|
if (!(k >= 8)) { |
||||||
|
if (!(!V_4)) { |
||||||
|
goto BasicBlock_465; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(j, k) != (IL__ldsfld(Empty)))) { |
||||||
|
V_4 = 1; |
||||||
|
goto BasicBlock_461; |
||||||
|
} |
||||||
|
if (!((@this.squares).Get(j, k) != i)) { |
||||||
|
if (!((@this.safeDiscs).Get(j, k))) { |
||||||
|
goto BasicBlock_460; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_461; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_460; |
||||||
|
} |
||||||
|
BasicBlock_461: |
||||||
|
j = (j + 1); |
||||||
|
k = (k + 1); |
||||||
|
goto Loop_567; |
||||||
|
BasicBlock_460: |
||||||
|
V_6 = 1; |
||||||
|
goto BasicBlock_461; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_465; |
||||||
|
} |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_465; |
||||||
|
} |
||||||
|
} |
||||||
|
BasicBlock_465: |
||||||
|
if (!V_3) goto BasicBlock_467; |
||||||
|
if (V_4) goto BasicBlock_471; |
||||||
|
BasicBlock_467: |
||||||
|
if (!V_3) goto BasicBlock_469; |
||||||
|
if (V_6) goto BasicBlock_471; |
||||||
|
BasicBlock_469: |
||||||
|
if (!V_5) goto BasicBlock_472; |
||||||
|
if (!V_4) goto BasicBlock_472; |
||||||
|
BasicBlock_471: |
||||||
|
return 1; |
||||||
|
BasicBlock_472: |
||||||
|
V_3 = 0; |
||||||
|
V_4 = 0; |
||||||
|
V_5 = 0; |
||||||
|
V_6 = 0; |
||||||
|
j = (row - 1); |
||||||
|
k = (col + 1); |
||||||
|
Loop_584: |
||||||
|
for (;;) { |
||||||
|
if (!(j < 0)) { |
||||||
|
if (k >= 8) goto BasicBlock_482; |
||||||
|
if (!V_3) goto BasicBlock_473; |
||||||
|
goto BasicBlock_482; |
||||||
|
BasicBlock_473: |
||||||
|
if ((@this.squares).Get(j, k) != (IL__ldsfld(Empty))) goto BasicBlock_475; |
||||||
|
V_3 = 1; |
||||||
|
goto BasicBlock_478; |
||||||
|
BasicBlock_475: |
||||||
|
if ((@this.squares).Get(j, k) != i) goto BasicBlock_477; |
||||||
|
goto BasicBlock_476; |
||||||
|
BasicBlock_478: |
||||||
|
j = (j - 1); |
||||||
|
k = (k + 1); |
||||||
|
goto Loop_584; |
||||||
|
BasicBlock_476: |
||||||
|
if ((@this.safeDiscs).Get(j, k)) goto BasicBlock_478; |
||||||
|
BasicBlock_477: |
||||||
|
V_5 = 1; |
||||||
|
goto BasicBlock_478; |
||||||
|
} |
||||||
|
else { |
||||||
|
goto BasicBlock_482; |
||||||
|
} |
||||||
|
} |
||||||
|
BasicBlock_482: |
||||||
|
j = (row + 1); |
||||||
|
k = (col - 1); |
||||||
|
for (;; k = (k - 1)) { |
||||||
|
if (j >= 8) break; |
||||||
|
if (k < 0) break; |
||||||
|
if (!V_4) goto BasicBlock_483; |
||||||
|
break; |
||||||
|
BasicBlock_483: |
||||||
|
if ((@this.squares).Get(j, k) != (IL__ldsfld(Empty))) goto BasicBlock_485; |
||||||
|
V_4 = 1; |
||||||
|
goto BasicBlock_488; |
||||||
|
BasicBlock_485: |
||||||
|
if ((@this.squares).Get(j, k) != i) goto BasicBlock_487; |
||||||
|
if ((@this.safeDiscs).Get(j, k)) goto BasicBlock_488; |
||||||
|
BasicBlock_487: |
||||||
|
V_6 = 1; |
||||||
|
BasicBlock_488: |
||||||
|
j = (j + 1); |
||||||
|
} |
||||||
|
if (!V_3) goto BasicBlock_494; |
||||||
|
if (V_4) goto BasicBlock_498; |
||||||
|
BasicBlock_494: |
||||||
|
if (!V_3) goto BasicBlock_496; |
||||||
|
if (V_6) goto BasicBlock_498; |
||||||
|
BasicBlock_496: |
||||||
|
if (!V_5) goto BasicBlock_499; |
||||||
|
if (!V_4) goto BasicBlock_499; |
||||||
|
BasicBlock_498: |
||||||
|
return 1; |
||||||
|
BasicBlock_499: |
||||||
|
return 0; |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
|||||||
Loading…
Reference in new issue