Search found 5 matches
- Sun Feb 28, 2016 12:41 am
- Forum: Talking LiveCode
- Topic: Battleships game (not sure if this is the correct place)
- Replies: 11
- Views: 7929
Re: Battleships game (not sure if this is the correct place)
Thanks for your suggestions, you all seem to be agreeing on the button method so I'll attempt it again using this approach, seems so much easier now that I think about it, I'll post back if I am successful or if I'm in need of more help, thanks once again.
- Fri Feb 26, 2016 6:40 pm
- Forum: Talking LiveCode
- Topic: Battleships game (not sure if this is the correct place)
- Replies: 11
- Views: 7929
Re: Battleships game (not sure if this is the correct place)
Unfortunately not, the coordinate I'm trying to input into the grid is a value that the user inputs themselves using the variables LargeColumnArray and LargeRowArray, and these values are then represented by the X's on the grid.
- Fri Feb 26, 2016 4:14 pm
- Forum: Talking LiveCode
- Topic: Battleships game (not sure if this is the correct place)
- Replies: 11
- Views: 7929
Re: Battleships game (not sure if this is the correct place)
For whatever reason it is not letting me attach the file so I have pasted my code below from the point of the grid being made and where I wish to enter the code to get it to output: end Get_Largeposition on DLargeArray @ArrayLarge, @CoordinateLarge, Row, Column repeat with Row = 0 to 9 repeat with C...
- Fri Feb 26, 2016 3:52 pm
- Forum: Talking LiveCode
- Topic: Battleships game (not sure if this is the correct place)
- Replies: 11
- Views: 7929
Re: Battleships game (not sure if this is the correct place)
I have used a 2d array to create my grid of zeros. I've used a nested loop to create a 10 x 10 grid which then has to have the 0 in a certain location changed to an X for a location of a ship. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Here's an example of how it is outputted using the 2D array. But if I wante...
- Fri Feb 26, 2016 10:14 am
- Forum: Talking LiveCode
- Topic: Battleships game (not sure if this is the correct place)
- Replies: 11
- Views: 7929
Battleships game (not sure if this is the correct place)
I am unsure if this is the correct place to post this but I am in need of serious help if possible. I have been trying to code a working game of battleships for at least 3 months now. The project is on LiveCode 7.0 . I've been trying to code a 10 by 10 grid for 0's to show up and the user needs to i...