Skip to content

Instantly share code, notes, and snippets.

Susan Buck susanBuck

Block or report user

Report or block susanBuck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@susanBuck
susanBuck / peer-review.md
Last active Oct 18, 2019
P3 Peer Review template
View peer-review.md

P3 Peer Review

Answer the following questions in regards to the student's project you are reviewing. Include code snippets in your answers when relevant.

Are you able to produce any errors or unexpected results?

@susanBuck
susanBuck / script.js
Created Oct 16, 2019
Vue.js listen for keypress example for Norcius
View script.js
let app = new Vue({
el: '#app',
methods: {
isAlpha: function (ch) {
return /^[A-Z]$/i.test(ch);
},
checkForLetter(letter) {
console.log(letter);
}
},
@susanBuck
susanBuck / index.php
Created Oct 9, 2019
Tac tac toe example for Shawna
View index.php
<?php require 'index-controller-sb.php'; ?>
<!doctype html>
<html lang='en'>
<head>
<title>Tic Tac Toe</title>
<meta charset='utf-8'>
</head>
<body>
<h1>Tic Tac Toe</h1>
@susanBuck
susanBuck / index-controller.php
Created Oct 9, 2019
Tac tac toe example for Shawna
View index-controller.php
<?php
# Define a board where each key is a rowcolumn identifier
# Values are empty strings to start - will eventually contain either x's or o's
$board = ['a1' => '', 'a2' => '', 'a3' => '',
'b1' => '', 'b2' => '', 'b3' => '',
'c1' => '', 'c2' => '', 'c3' => ''
];
# Let x always be the first player
@susanBuck
susanBuck / README.md
Last active Oct 10, 2019
e28 Project 2 README template
View README.md

Any instructions/notes in italics should be removed from the template before submitting.

Project 2

Build strategy

Put an x in the build strategy you used. Put an x in each if you tackled both.

  • Integrated
@susanBuck
susanBuck / index.php
Created Oct 7, 2019
Example for Anna
View index.php
<?php require "index_controller.php"?>
<!DOCTYPE html>
<html lang='en'>
<head>
<title>Rock Paper Scissors</title>
<meta charset='utf-8'>
</head>
<body>
View index-controller.php
<?php
$moves = ["rock", "paper", "scissors"];
$winner = [];
$finalwinner = null;
$player1scores = 0;
$player2scores = 0;
$result = [];
for ($i = 0; $i < 5; $i++) {
$player1Move = $moves[rand(0, 2)];
@susanBuck
susanBuck / index.php
Created Oct 7, 2019
Example for Mary
View index.php
<?php require "index-controller.php"; ?>
<!doctype html>
<html lang='en'>
<head>
<title>Kung Fu Game Simulator</title>
<meta charset='utf-8'>
<link href="css/butterfly.css" rel="stylesheet">
</head>
View index-controller.php
<?php
$forms = ["Butterfly", "Flower", "Dragon", "Crane", "Snake", "Iron Palm", "Tiger", "Leopard", "Dragon's Tail"];
$students = ['Liz', 'Maya', 'Mary', 'Dennis', 'Rebecca'];
$finalForm = $forms[count($forms) - 1];
# This is where we'll correct our results
# Each key will be a student name
# And each value will be an array with keys 'highest form' (string) and 'blackbelt' (boolean)
@susanBuck
susanBuck / controller.php
Created Oct 7, 2019
High-low example for Stephanie
View controller.php
<?php
$answer = rand(1, 50);
$guess = rand(1, 50);
$newGuess = null;
$status = null;
$guesses = [];
$statuses = [];
while ($guess != $answer) {
You can’t perform that action at this time.