Day 8
Teams
Sana, Aibat
Nurbal, Zarina
Madi, Miras
Azim, Aisulu
Madina, Ulpan
Anvar, Eldana
Olzhas, Aruzhan
Bibinur, Lyailya
Lesson
-
Algorithms
Sorting
Artificial Intelligence
Assignment/Homework
Blog - Pick 3 topics. Write a post about the most interesting topic to present on the last day. Why do you like it? Why would people find this interesting? Pick 3 from these:
Twine - Interactive fiction and creating a story
Github - Managing code
Arduino - Electronics
Algorithms - Solving problems
Artificial Intelligence - Machines and humans
Processing - Programming language
Animations/Graphics - Motion and images
Game Design - What is a game?
Roles of Development - Types of jobs
Blogging with Jekyll - What is a blog and how to make one
Choose your own topic
Processing
Rock Paper Scissors
Tic Tac Toe ← FSM
Sorting
-
Design a game using a dice - This game is like Train and that Dragon Cancer. It is meant to help people realize an issue in the world to improve it. Do a 1 page design document. You can draw on pencil and paper or do it digitally. If it's digital, then do post on your blog.
int x = 30;
int dx = 0;
int y = 20;
int dy = 0;
void setup() {
size (500,500);
}
void draw() {
//background(255,255,0);
fill(random(256),random(256),random(256));
ellipse(x,y,20,20);
// d-pad = direction-pad
if (keyPressed && key == 'd') {
dx = 1;
}
else {
dx = 0;
}
if (keyPressed && key == 's') {
dy = 1;
}
else {
dy = 0;
}
x = x+dx;
y = y+dy;
if (keyPressed && key == 'a') {
dx = -1;
}
else {
dx = 0;
}
if (keyPressed && key == 'w') {
dy = -1;
}
else {
dy = 0;
}
x = x+dx;
y = y+dy;
}
int userInput = 0;
int computerInput = 0;
void setup() {
size(400,400);
}
void draw() {
background(0);
textSize(32);
text("(r)ock (p)aper (s)cissors", 10, 30);
textSize(20);
text("Press Space to Start Over", 10, 50);
// AI Code
computerInput = 2;
if (userInput == 0) {
if (keyPressed && key == 'r') {
userInput = 1;
}
else if (keyPressed && key == 'p') {
userInput = 2;
}
}
else if (userInput == 1) {
text("User plays rock", 50, 200);
if (computerInput == 2)
text("Computer plays paper", 50, 250);
if (userInput == 1 && computerInput == 2){
text("You Lose", 50, 100);
}
}
else if (userInput == 2) {
text("User plays paper", 50, 200);
}
else if (userInput == 3) {
text("User plays rock", 50, 200);
}
if (keyPressed && key == ' ') {
userInput = 0;
}
}