Skip to content

Instantly share code, notes, and snippets.

package main
import (
"regexp"
"fmt"
"strings"
"os"
"io"
"io/ioutil"
@dpakach
dpakach / tic-tac.py
Created December 16, 2017 11:31
tic tac toe game in python
import random
import time
print('welcome to the tic-tac-toe game'.upper())
print('\n\n\n')
game_list = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
player_chars = ['1', '2']
over = False
turn = 'P1'
@dpakach
dpakach / bird.html
Last active September 26, 2017 10:07
A simple game (flappy bird ) using html and javascript on html canvas
<canvas id="gc" height="600" width="600"></canvas>
<h1 id="scor"></h1>
<p id="hint"></p>
<script>
window.onload = function(){
canv = document.getElementById("gc");
ctx = canv.getContext("2d");
scor = document.getElementById("scor");
hint = document.getElementById("hint");
document.addEventListener("keydown", keyPush);