Skip to content

Instantly share code, notes, and snippets.

View lunacodes's full-sized avatar

Luna Lunapiena lunacodes

View GitHub Profile
@lunacodes
lunacodes / game2.py
Last active August 29, 2015 14:19
Shitty Python Sketch
"""
The point of this incarnation of the game is that there will be 3 areas for the player to explore, all connected by a center field.
Tasks:
Setup D-pad so that the image rotates with each direction
Get Monsters moving
Make Volume Control function do Pause instead???
#Come up with Loop or List system for Text Parsing
#Implement Pause function
@lunacodes
lunacodes / tic tac toe.py
Last active August 29, 2015 14:17
Tic Tac Toe
"""Note:
There is currently one known bug in this game:
If the player prematurely presses Enter, without inputting a Move - the game will crash - due to receiving a literal instead of an int
"""
import random
#Board constructed from strings. Each board position contains the letter chosen by the player
def drawBoard(board):
import pygame, sys
from pygame.locals import *
winwidth = 800
winheight = 800
wallwidth = winwidth * .4
wallheight = winheight * .4
gameDisplay = pygame.display.set_mode((winwidth, winheight))
import pygame, sys
from pygame.locals import *
from pygame.draw import rect as square
winWidth = 800
winHeight = 800
black = (0, 0, 0)
everything = pygame.sprite.Group()
import pygame, sys
from pygame.locals import *
from pygame.draw import rect as square
winWidth = 600
winHeight = 600
black = ( 0, 0, 0)
green = ( 0, 255, 0)
@lunacodes
lunacodes / tic tac toe.py
Created January 20, 2015 16:39
tic tac toe.py
import random
def drawBoard(board):
print(' | |')
print(' ' + board[7] + ' | ' + board[8] + ' | ' + board[9])
print(' | |')
print('-----------')
print(' | |')
print(' ' + board[4] + ' | ' + board[5] + ' | ' + board[6])