SFML community forums

Help => Graphics => Topic started by: Redpandaboss09 on July 20, 2021, 10:20:03 pm

Title: How can I create a grid?
Post by: Redpandaboss09 on July 20, 2021, 10:20:03 pm
Hello all,

I'm new to SFML and still learning C++ and wanted to make the game Battleship. I've created this game in the console before but want to create it in a window with better AI. How can I create two 10x10 grids, each on their own side of the screen? I can give you a link to the code: https://github.com/Redpandaboss09/-battleship (https://github.com/Redpandaboss09/-battleship)
Title: Re: How can I create a grid?
Post by: Stauricus on July 21, 2021, 04:09:44 pm
just draw some lines horizontally and then vertically

search 'Line without thickness' here:
https://www.sfml-dev.org/tutorials/2.0/graphics-shape.php