Merge branch 'daniel-server' of https://github.com/OSU-CS290-Sp18/final-project-group-4 into daniel-server

This commit is contained in:
clairecahill
2018-06-12 19:56:59 -07:00
14 changed files with 510 additions and 7 deletions

View File

@@ -20,6 +20,14 @@ module Go
property turn : Color
property sockets : Array(HTTP::WebSocket)
def initialize()
@size = Size::Small
@white_pass = ""
@black_pass = ""
@board = Board.new
@turn = Color::Black
@sockets = [] of HTTP::WebSocket
end
def initialize(size : Size, @black_pass, @white_pass)
@size = size
@board = Board.new
@@ -133,7 +141,7 @@ module Go
end
def encode
{ @turn.to_s, @size.value, board_string(@board) }
{ @turn, @size.value, @white_pass.to_s, @black_pass.to_s, board_string(@board) }
end
end
end

72
src/Go/views/about.ecr Normal file
View File

@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>About Us</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700" rel="stylesheet">
<link rel="stylesheet" href="/css/style.css" media="screen">
<script src="https://use.fontawesome.com/releases/v5.0.9/js/all.js" defer></script>
</head>
<body>
<div class="card">
<h2>Hello!</h2>
<p>
Welcome to our Go website. We are Group 4 from CS 290. Our mission is very ambitious - to get an A in CS 290, Web Development. Despite the immense difficulty of this task, we did our best to bring you this website, so that you may enjoy playing the game of Go with your friends. After Google's AlphaGo's victory against the best human Go player, there's not really a point to playing against a computer - you will lose.
</p>
</div>
<div class="member-container card">
<h2>Group Members</h2>
<div class="toplevel">
<article class="member">
<div class="member-content">
<div class="person-photo" alt"">
<img src="/images/claire.jpg" alt="daa">
</div>
<h2 class="Person-Name" >Claire Cahill</h2>
<p class="member-text">
Claire created a page explaining the rules of Go, so that new players can learn how to play the game instead of clicking around randomly.
</p>
</div>
</article>
<article class="member">
<div class="member-content">
<div class="person-photo" alt"">
<img src="/images/danila.jpg" alt="daa">
</div>
<h2 class="Person-Name" >Danila Fedorin</h2>
<p class="member-text">
Danila created the front-end and a basic back-end for the Go game. He used unconventional languages, namely Elm, a functional programming language designed for web applications, and Crystal, a compiled sibiling language of Ruby.
</p>
</div>
</article>
<article class="member">
<div class="member-content">
<div class="person-photo" alt"">
<img src="/images/michael.jpg" alt="daa">
</div>
<h2 class="Person-Name" >Michael Huang</h2>
<p class="member-text">
Michael created this about page!
</p>
</div>
</article>
<article class="member">
<div class="member-content">
<div class="person-photo" alt"">
<img src="/images/matthew.jpg" alt="daa">
</div>
<h2 class="Person-Name" >Matthew Sessions</h2>
<p class="member-text">
Matt adapted the Crystal back-end to work with SQLite. This meant loading and saving Go games into the database instead of an in-memory cache, thereby allowing games to persist after server restarts.
</p>
</div>
</article>
</div>
</div>
</body>
</html>