Disable playing forced moves automatically by default

This commit is contained in:
Trevor Slocum 2024-01-13 13:02:48 -08:00
parent 5410496772
commit 8beef4b20d
4 changed files with 5 additions and 7 deletions

2
go.mod
View file

@ -7,7 +7,7 @@ require (
github.com/alexedwards/argon2id v1.0.0
github.com/gobwas/ws v1.3.2
github.com/gorilla/mux v1.8.1
github.com/jackc/pgx/v5 v5.5.1
github.com/jackc/pgx/v5 v5.5.2
github.com/jlouis/glicko2 v1.0.0
github.com/matcornic/hermes/v2 v2.1.0
)

4
go.sum
View file

@ -51,8 +51,8 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 h1:L0QtFUgDarD7Fpv9jeVMgy/+Ec0mtnmYuImjTz6dtDA=
github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
github.com/jackc/pgx/v5 v5.5.1 h1:5I9etrGkLrN+2XPCsi6XLlV5DITbSL/xBZdmAxFcXPI=
github.com/jackc/pgx/v5 v5.5.1/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA=
github.com/jackc/pgx/v5 v5.5.2 h1:iLlpgp4Cp/gC9Xuscl7lFL1PhhW+ZLtXZcrfCt4C3tA=
github.com/jackc/pgx/v5 v5.5.2/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A=
github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk=
github.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=
github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056 h1:iCHtR9CQyktQ5+f3dMVZfwD2KWJUgm7M0gdL9NGr8KA=

View file

@ -47,13 +47,13 @@ CREATE TABLE account (
rated_acey_multi integer NOT NULL DEFAULT 150000,
rated_tabula_single integer NOT NULL DEFAULT 150000,
rated_tabula_multi integer NOT NULL DEFAULT 150000,
autoplay smallint NOT NULL DEFAULT 1,
autoplay smallint NOT NULL DEFAULT 0,
highlight smallint NOT NULL DEFAULT 1,
pips smallint NOT NULL DEFAULT 1,
moves smallint NOT NULL DEFAULT 0,
flip smallint NOT NULL DEFAULT 0,
advanced smallint NOT NULL DEFAULT 0,
speed smallint NOT NULL DEFAULT 0
speed smallint NOT NULL DEFAULT 1
);
CREATE TABLE game (
id serial PRIMARY KEY,

View file

@ -196,7 +196,6 @@ func (s *server) handleWebSocket(w http.ResponseWriter, r *http.Request) {
connected: now,
active: now,
commands: commands,
autoplay: true,
Client: wsClient,
}
s.handleClient(c)
@ -302,7 +301,6 @@ func (s *server) handleConnection(conn net.Conn) {
connected: now,
active: now,
commands: commands,
autoplay: true,
Client: newSocketClient(conn, commands, events, s.verbose),
}
s.sendHello(c)