Skip to content

Instantly share code, notes, and snippets.

View NatashaTheRobot's full-sized avatar

Natasha Murashev NatashaTheRobot

View GitHub Profile
protocol AgeClasificationProtocol {
var age: Int { get }
func agetype() -> String
}
class Person {
var firstname: String
var lastname: String
var age: Int
@NatashaTheRobot
NatashaTheRobot / StanfordBreakoutGame
Created November 18, 2011 05:58
Stanford CS106A Breakout Game Solution
/*
* File: Breakout.java
* -------------------
* Name:
* Section Leader:
*
* This file will eventually implement the game of Breakout.
*/
import acm.graphics.*;
@NatashaTheRobot
NatashaTheRobot / WatchConnectivitySingletonDemo.swift
Last active December 29, 2022 14:44
WatchConnectivity Singleton Demo
//
// WatchSessionManager.swift
// WatchConnectivityDemo
//
// Created by Natasha Murashev on 9/3/15.
// Copyright © 2015 NatashaTheRobot. All rights reserved.
//
import WatchConnectivity
@NatashaTheRobot
NatashaTheRobot / HangmanConsole
Created November 12, 2011 08:04
This is the solution for part 1 of the Stanford CS106A Hangman Game, the Console - Based Hangman Game
/*
* File: Hangman.java
* ------------------
* This program will eventually play the Hangman game from
* Assignment #4.
*/
import acm.graphics.*;
import acm.program.*;
import acm.util.*;
@NatashaTheRobot
NatashaTheRobot / MidpointFindingKarel Solution
Created October 28, 2011 04:18
This is the solution the MidpointFindingKarel problem in the online Stanford CS 106A class
/*
* File: MidpointFindingKarel.java
* -------------------------------
* When you finish writing it, the MidpointFindingKarel class should
* leave a beeper on the corner closest to the center of 1st Street
* (or either of the two central corners if 1st Street has an even
* number of corners). Karel can put down additional beepers as it
* looks for the midpoint, but must pick them up again before it
* stops. The world may be of any size, but you are allowed to
* assume that it is at least as tall as it is wide.
@NatashaTheRobot
NatashaTheRobot / StoneMason Karel Solution
Created October 28, 2011 04:22
This is the solution to the StoneMasonKarel problem in the online Stanford CS 106A class
/*
* File: StoneMasonKarel.java
* --------------------------
* The StoneMasonKarel subclass as it appears here does nothing.
* When you finish writing it, it should solve the "repair the quad"
* problem from Assignment 1. In addition to editing the program,
* you should be sure to edit this comment so that it no longer
* indicates that the program does nothing.
*/
@NatashaTheRobot
NatashaTheRobot / BreakoutCreatePaddle
Created November 9, 2011 06:38
This is the solution to step 2 of the Stanford CS106A Breakout game assignment, creating a paddle and making it track with the mouse.
//adding individual paddle object
private GRect paddle;
private double lastX;
//paddle set-up
private void drawPaddle() {
//starting the paddle in the middle of the screen
double x = getWidth()/2 - PADDLE_WIDTH/2;
//the paddle height stays consistent throughout the game
//need to make sure to subtract the PADDLE_HEIGHT,
@NatashaTheRobot
NatashaTheRobot / PyramidSolution
Created November 1, 2011 00:23
This is the solution to the Pyramid problem from Assignment 2 of the Stanford CS106A Introduction to Programming Methodology Class
/*
* File: Pyramid.java
* Name:
* Section Leader:
* ------------------
* This file is the starter file for the Pyramid problem.
* It includes definitions of the constants that match the
* sample run in the assignment, but you should make sure
* that changing these values causes the generated display
* to change accordingly.
@NatashaTheRobot
NatashaTheRobot / YahtzeeSolution
Created November 23, 2011 21:10
This is the solution to Stanford CS106A Yahtzee Assignment 5
/*
* File: Yahtzee.java
* ------------------
* This program will eventually play the Yahtzee game.
*/
import acm.io.*;
import acm.program.*;
import acm.util.*;
import java.util.*;
@NatashaTheRobot
NatashaTheRobot / Target
Created October 31, 2011 19:41
This is the solution to the Target problem from Assignment 2 of the Stanford CS106A Introduction to Programming Methodology Class
/*
* File: Target.java
* Name:
* Section Leader:
* -----------------
* This file is the starter file for the Target problem.
*/
import acm.graphics.*;
import acm.program.*;