Skip to content

Instantly share code, notes, and snippets.

View roy4801's full-sized avatar
🎯
Focusing

roy4801

🎯
Focusing
View GitHub Profile
@roy4801
roy4801 / I_Want_them_all.pde
Created September 11, 2018 06:48
My First homework in Multimedia
/*
* I want them all.
* Author: roy4801
* 406262515
*/
size(600, 320);
background(255, 255, 255);
// Left Body
stroke(0, 0, 0);
@roy4801
roy4801 / catch_mouse.pde
Created October 2, 2018 07:59
2018-10-2
PImage cat, mouse;
boolean mouseLive = false;
boolean endGame = false;
int catPosX, catPosY, catSize;
int totalScore = 0;
int dir = 0;
final int numOfMouse = 50;
CharMouse []m = new CharMouse[numOfMouse];
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
@roy4801
roy4801 / fruit_plate.ino
Created November 27, 2018 08:13
Arduino HW3
#define LED_NUM 5
int pin[] = {4, 5, 6, 7, 8};
#define SPEAKER 12
#define ROLL A0
//const int speed = 300;
// 700 ~ 500 light
// 300
@roy4801
roy4801 / paino.ino
Created November 30, 2018 08:10
Arduino homework2 - paino
#define BTN_MAX 12
#define BTN_MIN 4
#define BTN_NUM (BTN_MAX-BTN_MIN+1)
#define SPEAKER1 2
#define SPEAKER2 3
#define NOTE_F4 349
#define NOTE_G4 392
#define NOTE_A4 440
#define NOTE_B4 494
@roy4801
roy4801 / Cutter_2018-12-03-212612_roy4801s-MacBook-Pro-96.crash
Created December 3, 2018 13:28
Error report of Cutter 2018-12-03
Process: Cutter [3952]
Path: /Applications/Cutter.app/Contents/MacOS/Cutter
Identifier: org.radare.cutter
Version: 1.7.2 (1.7.2)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Cutter [3952]
User ID: 501
Date/Time: 2018-12-03 21:26:11.382 +0800
@roy4801
roy4801 / bullet_fly.pde
Created December 11, 2018 06:11
Processing HW05
PImage sprite;
int numBullet = 5;
int currentBullet = 0;
float imageW = 130, imageH = 160;
boolean shot; // once click per shot
class Bullet
{
float x, y;
@roy4801
roy4801 / paint.pde
Created December 11, 2018 06:23
Processing HW02
int [] backgroundColor = {128, 128, 128};
int [] nowFillColor = {0, 0, 0};
void drawText(String s, int x, int y, int r, int g, int b)
{
fill(r, g, b);
text(s, x, y);
}
void functionArea()
@roy4801
roy4801 / random_pic.pde
Created December 11, 2018 06:36
Processing HW03
final int WIDTH = 600;
final int HEIGHT = 800;
final int total = 20;
int nowImageF = 1, nowImageB = 1;
int btnHeight = 50;
void createBtn(int x, int y, String text)
{
@roy4801
roy4801 / 99.py
Created February 20, 2019 09:52
9 x 9
def main():
for i in range(1, 10):
for j in range(1, 10):
print('{} * {} = {}'.format(i, j, i*j))
print('')
print('--------------------------------------------------------------------------', end='\n\n')
for i in range(1, 10):