can't remember

This commit is contained in:
Jeena Paradies 2011-02-11 12:28:34 +01:00
parent c67bcc32e7
commit fa63ea104b
9 changed files with 53 additions and 6 deletions

2
HOWTO
View file

@ -3,7 +3,7 @@ python version 2.x set to default.
INSTALL
1. Cd into directory where you to have the project
2. git-clone git@github.com:jeena/GGS.git (remember to have a local key)
2. git clone git@github.com:jeena/GGS.git (remember to have a local key)
3. cd GGS/
4. git submodule init
5. git submodule update

2
build
View file

@ -3,4 +3,4 @@
for i in `find src -name "*.erl"`
do
erlc -o ebin $i
done
done

17
client Normal file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env ruby -wKU
require 'socket' # Sockets are in standard library
hostname = 'localhost'
port = 7000
s = TCPSocket.open(hostname, port)
s.print(q.chop)
while line = s.gets # Read lines from the socket
puts "Got Echo: " + line.chop # And print with platform line terminator
end
s.close # Close the socket when done

@ -1 +1 @@
Subproject commit cbac148c440a93db44bad767a43c6d8619f6871f
Subproject commit 5350ed21606606dbee5ecb07e974f2abb9106270

View file

@ -12,8 +12,16 @@
function init() {
GameServer.addGame(game_name, main());
GameServer.addClient(game_name, new TicTacToeClient(frames.player1.document.getElementById("p1"), GameServer));
GameServer.addClient(game_name, new TicTacToeClient(frames.player2.document.getElementById("p2"), GameServer));
GameServer.addClient(
game_name,
new TicTacToeClient(frames.player1.document.getElementById("p1"),
GameServer
));
GameServer.addClient(
game_name,
new TicTacToeClient(frames.player2.document.getElementById("p2"),
GameServer
));
}
</script>
<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen">

View file

View file

@ -31,7 +31,7 @@ Command: define\n\
Content-Type: text\n\
Content-Length: 49\n\
\n\
function myFun() {return callErlang('a', 'b') ;}" % token)
function myFun() {return 'Hello World!' ;}" % token)
fs = s.makefile()
data = fs.readline()
print "Token:", token

22
src/key_value_store.erl Normal file
View file

@ -0,0 +1,22 @@
-module(key_value_store).
-export(start/0,stop/0,set_item/2,get_item/1,get/1,length(0,clean/0).
start() ->
spawn_link(fun() -> loop([]) end).
stop() ->
self() ! {stop}
loop(Touples) ->
receive ->
{set_item, Key, Value} ->
Touple = find(Touples, Key)
{stop} ->
{'EXIT', normal}
find([], _) -> false;
find([{Key, _}|Tuples], Match) ->
case Key == Match of
true -> true;
false -> find(Tuples, Match)
end.

0
start Normal file → Executable file
View file