battleship.py

Created by cent20

Created on May 18, 2022

574 Bytes

en dev actuellement


from math import *
from kandinsky import *



try:
    get_keys()
    os_c = (192,53,53)
except NameError:
    os_c = (255,183,52)

white_c = (255,255,255)

fr = fill_rect
tx = draw_string

def grille(x, y, num=True):
    for i in range(8):
        for j in range(8):
            fr(x+19*j,y+19*i,18,18,(196,196,196))
            tx(chr(j+65)*num,x+4+19*j,2)
        tx(str(i+1)*num,x+153,y+19*i)
        
grille(0, 20, False)

grille(156,20)

fr(0,176,320,22,(64,64,64))
fr(0,200,320,22,os_c)
tx("Gameplay by nsi.xyz/battleship", 10, 202, white_c , os_c )