Skip to content

Instantly share code, notes, and snippets.

View SpaceVoyager's full-sized avatar

Yuhang Wang SpaceVoyager

View GitHub Profile
@SpaceVoyager
SpaceVoyager / hangman.py
Created October 8, 2016 19:35
hangman.py
from scene import *
from ui import *
import speech
def is_point_inside_rect(point, rect):
x = rect[0]
y = rect[1]
w = rect[2]
h = rect[3]
@SpaceVoyager
SpaceVoyager / hangman.py
Created October 8, 2016 19:11
hangman.py
from scene import *
from ui import *
import speech
class MyScene (Scene):
def setup(self):
self.background_color = 'white'
keyboard_font = ('Futura', 40)
self.button_shape = ShapeNode(path=Path.rounded_rect(200, 250, 100, 80, 5), fill_color='blue', stroke_color='clear', parent=self)
@SpaceVoyager
SpaceVoyager / hangman.py
Created October 1, 2016 19:36
hangman.py
import canvas, console
def newgame():
word = console.input_alert('Please enter a phrase you have in mind:')
return word
canvas.clear()
word = newgame()
font = 'Arial Rounded MT Bold'
@SpaceVoyager
SpaceVoyager / superalien.py
Created October 1, 2016 13:31
superalien.py
# coding: utf-8
from scene import *
import json
import sound
import random
import math
A = Action
standing_texture = Texture('plf:AlienBlue_front')
@SpaceVoyager
SpaceVoyager / superalien.py
Created September 17, 2016 19:05
superalien.py
# coding: utf-8
from scene import *
import json
import sound
import random
import math
A = Action
standing_texture = Texture('plf:AlienBlue_front')
@SpaceVoyager
SpaceVoyager / superalien.py
Created September 10, 2016 19:20
superalien.py
# coding: utf-8
from scene import *
import json
import sound
import random
import math
A = Action
standing_texture = Texture('plf:AlienBlue_front')
@SpaceVoyager
SpaceVoyager / superalien.py
Created September 10, 2016 19:13
superalien.py
# coding: utf-8
from scene import *
import json
import sound
import random
import math
A = Action
standing_texture = Texture('plf:AlienBlue_front')
@SpaceVoyager
SpaceVoyager / superalien.py
Created September 10, 2016 18:27
superalien.py
# coding: utf-8
from scene import *
import json
import sound
import random
import math
A = Action
standing_texture = Texture('plf:AlienBlue_front')
@SpaceVoyager
SpaceVoyager / superalien.py
Created September 3, 2016 18:49
superalien.py
# coding: utf-8
from scene import *
import json
import sound
import random
import math
A = Action
standing_texture = Texture('plf:AlienBlue_front')
@SpaceVoyager
SpaceVoyager / superalien.py
Created August 6, 2016 19:23
superalien.py
# coding: utf-8
from scene import *
import json
import sound
import random
import math
A = Action
standing_texture = Texture('plf:AlienBlue_front')