Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
N1ghtF1re committed Jan 22, 2018
1 parent 852dc87 commit aabcb3a
Show file tree
Hide file tree
Showing 5 changed files with 465 additions and 0 deletions.
Binary file modified SeaBattle.exe
Binary file not shown.
16 changes: 16 additions & 0 deletions Source code/Game.pas
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,22 @@ procedure TFieldForm.player2FieldMouseDown(Sender: TObject;
else
begin
EnemyMatrix.Cells[x, y] := 'K';
if ( (x+1) in [1..10] ) then
EnemyMatrix.Cells[x+1, y] := '*';
if ( (y+1) in [1..10] ) then
EnemyMatrix.Cells[x, y+1] := '*';
if ( (x-1) in [1..10] ) then
EnemyMatrix.Cells[x-1, y] := '*';
if ( (y-1) in [1..10] ) then
EnemyMatrix.Cells[x, y-1] := '*';
if ( ((y-1) in [1..10] ) and ((x-1) in [1..10])) then
EnemyMatrix.Cells[x-1, y-1] := '*';
if ( ((y+1) in [1..10] ) and ((x-1) in [1..10])) then
EnemyMatrix.Cells[x-1, y+1] := '*';
if ( ((y-1) in [1..10] ) and ((x+1) in [1..10])) then
EnemyMatrix.Cells[x+1, y-1] := '*';
if ( ((y+1) in [1..10] ) and ((x+1) in [1..10])) then
EnemyMatrix.Cells[x+1, y+1] := '*';
LSX:=0;
LSY:=0;
end;
Expand Down
Binary file modified Source code/Win32/Debug/Game.dcu
Binary file not shown.
Binary file modified Source code/Win32/Debug/SeaBattle.exe
Binary file not shown.
Loading

0 comments on commit aabcb3a

Please sign in to comment.