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
class Board | |
def initialize() | |
# 7 columns | |
@board = Array.new(7) | |
# 6 rows per column | |
for x in 0..6 | |
@board[x] = Array.new(6) | |
for y in 0..5 | |
@board[x][y] = 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
### don't forget to redirect stdout for faster execution | |
import timeit | |
def print_char(i): | |
print chr(i) | |
def do_if_inline(i): | |
if (i == 65): |