Skip to content

Instantly share code, notes, and snippets.

@channel2007
channel2007 / Blockade.vb
Created May 31, 2020 14:31
【Family BASIC】遊戲開發(2)-封鎖線
10 DIM C(17,17)
20 D3=0
30 D7=0
40 IF F=1 THEN D3=D3+1
50 IF F=2 THEN D7=D7+1
60 D0=2
70 D1=2
80 D2=1
90 D4=15
100 D5=15
@channel2007
channel2007 / play.py
Last active April 9, 2021 07:56
那些年我們一起玩過的遊戲(四)-貪吃蛇(上) - play.py
# encoding: utf-8
import os
import random
import sys
import pygame
from pygame.locals import *
# 初始位置.
CONST_STARTING_1P_POS_X = 8
@channel2007
channel2007 / play.py
Created April 10, 2020 05:42
那些年我們一起玩過的遊戲(三)-打磚塊 - play.py
# encoding: utf-8
import os
import random
import sys
import pygame
from pygame.locals import *
from drew import *
@channel2007
channel2007 / drew.py
Last active April 10, 2020 07:35
那些年我們一起玩過的遊戲(三)-打磚塊 - drew.py
# encoding: utf-8
#-------------------------------------------------------------------------
# 畫Box.
#-------------------------------------------------------------------------
class Box(object):
#-------------------------------------------------------------------------
# 建構式.
# pygame : pygame.
# canvas : 畫佈.
@channel2007
channel2007 / play.py
Created March 30, 2020 14:46
那些年我們一起玩過的遊戲(二)-俄羅斯方塊 - play.py
# encoding: utf-8
import os, sys, random
import time
import pygame
from pygame.locals import *
from drew import *
# 常數-方塊快速下降速度.
BRICK_DROP_RAPIDLY = 0.01
# 常數-方塊正常下降速度.
@channel2007
channel2007 / drew.py
Created March 30, 2020 14:34
那些年我們一起玩過的遊戲(二)-俄羅斯方塊 - drew.py
# encoding: utf-8
#-------------------------------------------------------------------------
# 畫Box.
#-------------------------------------------------------------------------
class Box(object):
#-------------------------------------------------------------------------
# 建構式.
# pygame : pygame.
# canvas : 畫佈.
@channel2007
channel2007 / play.py
Created March 28, 2020 06:57
那些年我們一起玩過的遊戲-太空侵略者 - play.py
# encoding: utf-8
import random, sys, os, pygame
from pygame.locals import *
from drewEngine import *
#-------------------------------------------------------------------------
# 常數.
#-------------------------------------------------------------------------
# 顏色.
CONST_BLOCK = (0,0,0)
@channel2007
channel2007 / drewEngine.py
Created March 28, 2020 06:49
那些年我們一起玩過的遊戲-太空侵略者 - drewEngine.py
# encoding: utf-8
#-------------------------------------------------------------------------
# 點陣動畫系統.
#-------------------------------------------------------------------------
class Sprite(object):
#-------------------------------------------------------------------------
# 建構式.
# pygame : pygame.
# canvas : 畫佈.
# column : 列.