openpoker是一个基于Erlang开发的开源网络棋牌类游戏服务端
1)打开一个已创建mnesia schema的节点,比如master1
2)进入openpoker下的src目录(可以用我前面介绍的方法自动设定到该目录)
2)执行make:all(). 编译所有module到最新
3) 执行schema:install([node()]).
4) 执行test:all().
5)可以用appmon和tv等图形工具查看节点和表的状态
Erlang (BEAM) emulator version 5.6.3 [async-threads:0]
f:/ttttt/openpoker
Eshell V5.6.3 (abort with ^G)
(master1@xy)1> pwd().
f:/ttttt/openpoker
ok
(master1@xy)2> cd("./src").
f:/ttttt/openpoker/src
ok
(master1@xy)3> make:all().
Recompile: betting
Recompile: bits
Recompile: blinds
Recompile: bot
Recompile: counter
Recompile: deal_cards
Recompile: deck
Recompile: delayed_start
Recompile: fixed_limit
Recompile: game
Recompile: gateway
Recompile: hand
Recompile: id
Recompile: ircdb
Recompile: lang
Recompile: login
Recompile: monitor
Recompile: multibot
Recompile: observer
Recompile: player
Recompile: pot
Recompile: proto
Recompile: schema
Recompile: server
Recompile: showdown
Recompile: tcp_server
Recompile: util
Recompile: visitor
up_to_date
(master1@xy)4> schema:install([node()]).
=INFO REPORT==== 17-Jun-2008::09:45:49 ===
application: mnesia
exited: stopped
type: temporary
ok
(master1@xy)5> test:all().
Starting a port server on 10000...
Starting a port server on 10000...
Starting a port server on 10000...
238: CHAT: 0: Game is cancelled, not enough players
238: CANCEL
238: JOIN: 4 at seat#2
238: JOIN: 3 at seat#1
238: CHAT: 0: Game is starting
238: START
238: DEALER: seat#2
238: SB: seat#1
238: BB: seat#2
238: BET: 3, 5.00
238: BET: 4, 10.00
238: CARD: 3
238: CARD: 4
238: CARD: 3
238: CARD: 4
238: STAGE: 1
238: STATE: 3 = 2
238: WIN: 4, 15.00
238: END
Starting a port server on 10000...
Starting a port server on 10000...
ok
{ok,<0.9548.0>}
<0.9561.0>