asterism-games 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +5 -7
- data/VERSION +1 -1
- data/lib/asterism_games/play/othello.rb +2 -2
- metadata +1 -3
- data/bin/othello-tty +0 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 74d2dd1c8e013edfbce9943fa6a725a5173f5acfdaabbc42d93907759fd287b4
|
|
4
|
+
data.tar.gz: e8325208b814ef8e5e7a1d98286c828c287977f8698f1ccf049fd8a6917a4a04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 36982adb8c6655a83e6f5a007647f1fa814ad9719d6d4f92ceebee2e18131c5297b42576c24692ed8e388afa42f8a62b186a264bd1bec7a2d696565f5f03d74c
|
|
7
|
+
data.tar.gz: 2102d3e914d962b470008e8ffce3b8d4366243aa5962b0b124f91e5fbdf993cd36e49e97af735c8f861e412465ac3d0af8b93c777ae5c3133e3b4356d1d3d48d
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
Versions before 0.11.1 are noted in the README where each feature is
|
|
4
4
|
described ("games 0.10.0" and the like).
|
|
5
5
|
|
|
6
|
+
## 0.17.1
|
|
7
|
+
|
|
8
|
+
- `bin/othello-tty` is gone: `asterism-games play othello` is the same
|
|
9
|
+
client, and the gem installs `asterism-games` only.
|
|
10
|
+
- The first version published on rubygems.org: `gem install
|
|
11
|
+
asterism-games` gives `asterism-games play` with the asterism gem and
|
|
12
|
+
nothing else. The host and the tables are 0.17.0's.
|
|
13
|
+
|
|
6
14
|
## 0.17.0
|
|
7
15
|
|
|
8
16
|
- **`asterism-games play <game>`** (README "Playing in a terminal"): the
|
data/README.md
CHANGED
|
@@ -46,7 +46,7 @@ and the image"): the framework with the two sample games is the gem
|
|
|
46
46
|
└──requires──> asterism_games <───┘
|
|
47
47
|
(Host, Rooms, Config, Store, Game, Remote) ──> asterism
|
|
48
48
|
|
|
49
|
-
the gem asterism-games: lib/ (framework, othello, board, the terminal clients), bin/asterism-games
|
|
49
|
+
the gem asterism-games: lib/ (framework, othello, board, the terminal clients), bin/asterism-games
|
|
50
50
|
the image: all of the above, app/ (mahjong), config/, the Gemfile's gems
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -62,7 +62,6 @@ the console ("Permanent tables"; the server's setup: docs/install.md).
|
|
|
62
62
|
| `asterism-games.gemspec` | the gem: what it holds and needs ("The gem and the image") |
|
|
63
63
|
| `bin/asterism-games` | the host (loads the framework and the games); `status`; `play <game>`, a table in this terminal ("Playing in a terminal"); `help` |
|
|
64
64
|
| `bin/mahjong-bots` | players without screens, for trying a mahjong table (one process each; not in the gem) |
|
|
65
|
-
| `bin/othello-tty` | `asterism-games play othello`, under its old name |
|
|
66
65
|
| `lib/asterism_games/play.rb`, `lib/asterism_games/play/` | the terminal clients ("Playing in a terminal"): the options, `othello.rb`, `mahjong.rb` with `mahjong_text.rb` (tiles as text, widths, reading the input) and `mahjong_screen.rb` (the screen); they need neither the framework nor riichi_engine |
|
|
67
66
|
| `lib/asterism_games.rb` | the framework, without any game |
|
|
68
67
|
| `lib/asterism_games/game.rb` | the base of a game: the registry, the members and tokens, who joins in a room, the views, the time, saving ("Writing a game") |
|
|
@@ -90,7 +89,7 @@ the console ("Permanent tables"; the server's setup: docs/install.md).
|
|
|
90
89
|
game host of your own: the framework, the two sample games that need
|
|
91
90
|
nothing else (othello, the drawing board), `bin/asterism-games` (with
|
|
92
91
|
`play`, the terminal clients of othello and mahjong: a mahjong table needs
|
|
93
|
-
riichi_engine, its client does not)
|
|
92
|
+
riichi_engine, its client does not). It depends on
|
|
94
93
|
the asterism gem only (0.7.1 or later in
|
|
95
94
|
0.x; what came after 0.7.1, such as `@status` and `on_app_join`, is used
|
|
96
95
|
when there). Not in it: mahjong (`app/`, it needs the riichi_engine fork
|
|
@@ -402,7 +401,7 @@ list's flag), a mahjong seat is played for after a short wait, the status
|
|
|
402
401
|
counts it. The host learns it from Asterism, not from the calls (games
|
|
403
402
|
0.8.0), and by the player's table app (games 0.10.0): a table app runs as
|
|
404
403
|
the application **`game`** of its node (the boards' and the browsers'
|
|
405
|
-
table apps, `
|
|
404
|
+
table apps, `asterism-games play`, `bin/mahjong-bots` do), and the host
|
|
406
405
|
follows the liveliness token `asterism/<node>/game`. The Net's
|
|
407
406
|
`on_app_leave` tells it that the table app left the network (a closed
|
|
408
407
|
browser tab, a board's app that closed, a process killed, a line that
|
|
@@ -447,7 +446,7 @@ without a call (away after `away_seconds`, measured 13.6 s with the default
|
|
|
447
446
|
nothing in the host changes with it.
|
|
448
447
|
|
|
449
448
|
The screens follow the host the same way: the tables' apps (fmruby-core
|
|
450
|
-
`flash/app/game/`) and `
|
|
449
|
+
`flash/app/game/`) and `asterism-games play` take a host's tables off their
|
|
451
450
|
list when its node leaves and look for them again when a node joins
|
|
452
451
|
(Asterism's `each` reads the liveliness they already follow: no message is
|
|
453
452
|
sent); at a table, a host that leaves shows the connection lost, the
|
|
@@ -1584,8 +1583,7 @@ squares next to a corner last), then the most discs turned.
|
|
|
1584
1583
|
|
|
1585
1584
|
### In a terminal: `asterism-games play othello`
|
|
1586
1585
|
|
|
1587
|
-
(`bin/othello-tty` until games 0.17.0; it is
|
|
1588
|
-
with the same options.) CRuby and the asterism gem only (no Family
|
|
1586
|
+
(`bin/othello-tty` until games 0.17.0; it is gone in 0.17.1.) CRuby and the asterism gem only (no Family
|
|
1589
1587
|
mruby). The options are every client's ("Playing in a terminal"). It joins the table,
|
|
1590
1588
|
draws the board as text at every change (it takes the state the host puts
|
|
1591
1589
|
and asks its view; X black, O white, `*` the squares it may play) and on a
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.17.
|
|
1
|
+
0.17.1
|
|
@@ -5,7 +5,7 @@ require "asterism"
|
|
|
5
5
|
module AsterismGames
|
|
6
6
|
module Play
|
|
7
7
|
# An othello table in a terminal (README "The othello table"):
|
|
8
|
-
# `asterism-games play othello
|
|
8
|
+
# `asterism-games play othello`.
|
|
9
9
|
# It joins the table, shows the board as text at every change (the
|
|
10
10
|
# state the host puts) and reads commands: watch, or sit and type the
|
|
11
11
|
# squares ("d3"). When the table's host leaves the network (Asterism's
|
|
@@ -100,7 +100,7 @@ module AsterismGames
|
|
|
100
100
|
def start
|
|
101
101
|
r = @table.join(@name)
|
|
102
102
|
# "identity": in a room, only the seats and the host's names join.
|
|
103
|
-
abort "othello
|
|
103
|
+
abort "play othello: #{@path}: join refused: #{r.is_a?(Hash) ? r['error'] : r.inspect}" unless r.is_a?(Hash) && r["token"]
|
|
104
104
|
@token = r["token"]
|
|
105
105
|
host, app, tname = @path.split("/")
|
|
106
106
|
# The state the host puts after every change (and every 5 s): a newer
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: asterism-games
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.17.
|
|
4
|
+
version: 0.17.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Katsuhiko Kageyama
|
|
@@ -39,7 +39,6 @@ description: 'A framework for the server side of a game on an Asterism network:
|
|
|
39
39
|
email:
|
|
40
40
|
executables:
|
|
41
41
|
- asterism-games
|
|
42
|
-
- othello-tty
|
|
43
42
|
extensions: []
|
|
44
43
|
extra_rdoc_files: []
|
|
45
44
|
files:
|
|
@@ -48,7 +47,6 @@ files:
|
|
|
48
47
|
- README.md
|
|
49
48
|
- VERSION
|
|
50
49
|
- bin/asterism-games
|
|
51
|
-
- bin/othello-tty
|
|
52
50
|
- lib/asterism_games.rb
|
|
53
51
|
- lib/asterism_games/ai.rb
|
|
54
52
|
- lib/asterism_games/ai_hub.rb
|
data/bin/othello-tty
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
# An othello table in a terminal: kept for the scripts and the habits of
|
|
5
|
-
# before games 0.17.0. It is `asterism-games play othello` (README
|
|
6
|
-
# "Playing in a terminal"), with the same options:
|
|
7
|
-
#
|
|
8
|
-
# bundle exec bin/othello-tty [--router tcp/127.0.0.1:7447] [--table games/games/othello1]
|
|
9
|
-
# [--name NAME] [--node NODE] [--credentials alice.tar]
|
|
10
|
-
# [--namespace room/01] [--commands "sit,cpu,start,auto"] [--until-over]
|
|
11
|
-
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
|
|
12
|
-
require "asterism_games/play"
|
|
13
|
-
|
|
14
|
-
exit AsterismGames::Play.main(["othello", *ARGV])
|