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
#!/usr/bin/env python3.3 | |
# -*- coding: utf-8 -*- | |
"""A Hangman Demo for Python3 form yipyip. Guess some python3 keywords ! | |
see https://gist.github.com/yipyip/6038584 for original code | |
""" | |
#### | |
import random |
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 turtle | |
import random | |
peter=turtle.Turtle() | |
peter.pencolor("blue") | |
peter.pensize(3) | |
peter.fillcolor("red") | |
franz=turtle.Turtle() | |
franz.pencolor("yellow") |
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 random | |
class Ship: | |
'''all ships are part of the boat class''' | |
number = 1 | |
def __init__(self, player, length): | |
'''chooses random location & direction for ship for a given length''' | |
# print('ship size: ', length, sep='') |
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 random | |
class Ship: | |
'''all ships are part of the boat class''' | |
number = 1 | |
def __init__(self, player, length): | |
'''chooses random location & direction for ship for a given length''' | |
# print('ship size: ', length, sep='') |
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
# Credit for this: Nicholas Swift | |
# as found at https://medium.com/@nicholas.w.swift/easy-a-star-pathfinding-7e6689c7f7b2 | |
from warnings import warn | |
import heapq | |
class Node: | |
""" | |
A node class for A* Pathfinding | |
""" |