在這兩週,每個人將要設法去完成一個小遊戲, 我們提供兩種選擇:
- 第一種選擇:我們提供兩個小遊戲範本
在實作時,我們提供一個可以完成的步驟,要做的事每個步驟的實作部分。
在這兩週,每個人將要設法去完成一個小遊戲, 我們提供兩種選擇:
在實作時,我們提供一個可以完成的步驟,要做的事每個步驟的實作部分。
| glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB); | |
| glutInitWindowSize(600,600); | |
| glutInitWindowPosition(80,80); | |
| int gMainHandle; | |
| gMainHandle = glutCreateWindow("QAQ"); | |
| glutSetWindow(gMainHandle); | |
| HWND hwnd = FindWindow(NULL,"QAQ"); | |
| if( hwnd ) | |
| { | |
| LONG style; |
| #include<stdio.h> | |
| #include<stdlib.h> | |
| #include<string.h> | |
| char uppre[10][10] = {"module","class","def","if","else","unless","for","when","case","do"}; | |
| const int UP_MAX = 10; | |
| char downpre[3][10] = {"end","else","when"}; | |
| const int DOWN_MAX = 3 ; | |
| bool isdown(char *str) | |
| { | |
| if((str[0] == '#') or (str[1] == '#')) return false; |
| import pygame | |
| from pygame.locals import * | |
| def main(): | |
| pygame.init() | |
| pygame.font.init() | |
| screen = pygame.display.set_mode((600, 600), 0, 32) | |
| pygame.display.set_caption("Hello world") | |
| #include<map> | |
| #include<cstdio> | |
| #include<cstdlib> | |
| typedef std::map<int, int> mic; | |
| typedef std::map<int, int>::iterator itmic; | |
| int main(){ | |
| mic mmap; | |
| itmic it; | |
| for(int lx = 0;lx < 100000;lx++) |
| #include <OpenAL/al.h> | |
| #include <OpenAL/alc.h> | |
| #include <string> | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <iostream> | |
| #include <cstring> | |
| #define NUM_BUFFERS 2 | |
| #define NUM_SOURCES 2 | |
| #define NUM_ENVIRONMENTS 2 |
| \NeedsTeXFormat{LaTeX2e}[1994/06/01] | |
| \ProvidesPackage{haflag}[2015/03/22 HAFlag Package] | |
| \usepackage{tikz} | |
| \newcommand{\haflag}[1]{% text | |
| \begin{tikzpicture}[scale=0.1,rotate=-10,shift={(-15, 0)},overlay,remember picture] | |
| \draw[fill=black, thick] (0,0) -- ++ (0,8) arc (180:0:0.4 and 0.1) -- ++ (0,-8) arc (360:180:0.4 and 0.1); | |
| \draw[thick] (0,8) arc (180:360:0.4 and 0.1); | |
| \draw[fill=white,thick] (0.8,7.5) to[out=-30,in=210] ++(3,0) to[out=30,in=150] ++ (3,0) -- ++ (0,-4.5) to [out=150,in=30] ++(-3,0) to[out=210,in=-30] ++(-3,0) -- cycle; |
| import tornado.ioloop | |
| import tornado.web | |
| @tornado.gen.coroutine | |
| def getstr(): | |
| raise tornado.gen.Return("Hello coroutine") | |
| class MainHandler(tornado.web.RequestHandler): | |
| @tornado.gen.coroutine | |
| def get(self): |
| import requests | |
| import time | |
| import random | |
| import json | |
| import sys | |
| access_token = "access_token=[APP的Token]" | |
| base_url = "https://graph.facebook.com/v2.3/" |
| Vue.component('jscolor', { | |
| template: '<input v-model="value" class="jscolor"/>', | |
| props : ['value'], | |
| mounted : function(){ | |
| window.jscolor.installByClassName('jscolor'); | |
| this.$el.jscolor.fromString(this.value); | |
| $(this.$el).on('change', function(_this){ | |
| return function(){ | |
| _this.$emit('input', this.value); | |
| } |