Skip to content

Instantly share code, notes, and snippets.

@albionbrown
Last active April 27, 2022 16:39
Show Gist options
  • Select an option

  • Save albionbrown/045002da6ac9ce78e9dbdb8ed7b8fcda to your computer and use it in GitHub Desktop.

Select an option

Save albionbrown/045002da6ac9ce78e9dbdb8ed7b8fcda to your computer and use it in GitHub Desktop.
#! /bin/python
import turtle
print("Let's play Battleships!")
columns = 7
rows = 7
def print_grid():
#screen_turtle = turtle.Turtle()
#screen_turtle.bgcolor('blue')
grid_turtle = turtle.Turtle()
grid_turtle.penup()
grid_turtle.speed("fastest")
# Draw columns
grid_turtle.setx(-100)
grid_turtle.sety(100)
grid_turtle.pendown()
grid_turtle.forward(300)
# Set up the game
print_grid()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment