Thread: Battleship game
View Single Post
Senior Member
reuben2011's Avatar
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 05-25-2011, 05:14 PM

How about this: Click the ship to select it. Then the ship gets placed at (1,1) on the grid and you use the "when a key is pressed" to make the ship move one tile at a time. You're going to need to keep counters and use alot of if/else statements to make sure the ship is in bounds. I would rather use coordinates to keep track of the position rather than testing for proximity. Then you can have <SPACE> rotate the ship. If the ship can be placed, color it green; if it can't be placed, color the ship red. Then have the user press <ENTER> to have the ship go to it's final position (only if the ship is green.)

-Escape the Kitchen
-That ninja animation
-Hill Collision

Upcoming Projects
-Some penguin adventure game?
Reply With Quote