SHARE
TWEET

Untitled

a guest Feb 15th, 2019 144 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. r1:= coordinate1.row.as_integer_32
  2.                 c1:= coordinate1.column.as_integer_32
  3.                 r2:= coordinate2.row.as_integer_32
  4.                 c2:= coordinate2.column.as_integer_32
  5.  
  6.                 game_message1:= "OK"
  7.  
  8.                 if (g.board[r1,c1].out ~ "O") or (g.board[r1,c1].out ~ "X") or (g.board[r2,c2].out ~ "O") or (g.board[r2,c2].out ~ "X") then
  9.                     game_message1 := "Already fired there"
  10.                 else
  11.  
  12.                     cur_bombs:= cur_bombs + 1
  13.                     if (g.board[r1,c1].out ~ "h") or (g.board[r1,c1].out ~ "v") then
  14.                         g.board[r1,c1] := create {SHIP_ALPHABET}.make ('X')
  15.                         cur_score:= cur_score + 1
  16.                         update_generated_ships(r1,c1)
  17.                         bomb_state:= true
  18.                     else
  19.                         game_message2:= "Miss!"
  20.                         g.board[r1,c1] := create {SHIP_ALPHABET}.make ('O')
  21.                     end
  22.  
  23.                     if (g.board[r2,c2].out ~ "h") or (g.board[r2,c2].out ~ "v") then
  24.                         g.board[r2,c2] := create {SHIP_ALPHABET}.make ('X')
  25.                         cur_score:= cur_score + 1
  26.                         update_generated_ships(r2,c2)
  27.                     else
  28.                         game_message2:= "Miss!"
  29.                         g.board[r2,c2] := create {SHIP_ALPHABET}.make ('O')
  30.                     end
  31.  
  32.                     game_message2.append(message_update_after_shot.out)
  33.                 end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top