This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import math | |
import random | |
from typing import List, Dict, Tuple | |
width, height = [int(i) for i in input().split()] | |
grid_data, my_matter, opp_matter = [ | |
[{} for i in range(height)] for j in range(width)], 0, 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame, sys, time, random | |
#初始設定(全域變數) | |
# tuple形式傳遞 | |
# 顏色 = (R, G, B) | |
black = (0, 0, 0) | |
white = (255, 255, 255) | |
red = (255, 0, 0) | |
green = (0, 255, 0) |