Browse Source

Migrate to code.rocketnine.space

master
Trevor Slocum 2 months ago
parent
commit
417d9a6ce7
22 changed files with 100 additions and 174 deletions
  1. +0
    -33
      .gitlab-ci.yml
  2. +5
    -6
      README.md
  3. +3
    -3
      cmd/netris-server/main.go
  4. +2
    -53
      cmd/netris/config.go
  5. +5
    -7
      cmd/netris/gui.go
  6. +4
    -4
      cmd/netris/gui_init.go
  7. +3
    -3
      cmd/netris/gui_input.go
  8. +1
    -1
      cmd/netris/gui_test.go
  9. +8
    -8
      cmd/netris/gui_title.go
  10. +18
    -13
      cmd/netris/main.go
  11. +6
    -7
      go.mod
  12. +33
    -24
      go.sum
  13. +2
    -2
      goreleaser.yml
  14. +1
    -1
      pkg/game/command.go
  15. +1
    -1
      pkg/game/conn.go
  16. +2
    -2
      pkg/game/game.go
  17. +1
    -1
      pkg/game/player.go
  18. +1
    -1
      pkg/game/server.go
  19. +1
    -1
      pkg/game/ssh/server.go
  20. +1
    -1
      pkg/game/ssh/server_windows.go
  21. +1
    -1
      pkg/mino/block.go
  22. +1
    -1
      pkg/mino/matrix.go

+ 0
- 33
.gitlab-ci.yml View File

@ -1,33 +0,0 @@
image: golang:latest
stages:
- validate
- build
fmt:
stage: validate
script:
- gofmt -l -s -e .
- exit $(gofmt -l -s -e . | wc -l)
vet:
stage: validate
script:
- go vet -composites=false ./...
test:
stage: validate
script:
- go test -race -v ./...
build-netris:
stage: build
script:
- cd cmd/netris
- go build
build-netris-server:
stage: build
script:
- cd cmd/netris-server
- go build

+ 5
- 6
README.md View File

@ -1,5 +1,4 @@
# netris
[![CI status](https://gitlab.com/tslocum/netris/badges/master/pipeline.svg)](https://gitlab.com/tslocum/netris/commits/master)
[![Donate](https://img.shields.io/liberapay/receives/rocketnine.space.svg?logo=liberapay)](https://liberapay.com/rocketnine.space)
Multiplayer Tetris clone
@ -33,26 +32,26 @@ Windows and Linux binaries are available.
### Compile
```bash
go get gitlab.com/tslocum/netris/cmd/netris
go get code.rocketnine.space/tslocum/netris/cmd/netris
```
## Configure
See [CONFIGURATION.md](https://gitlab.com/tslocum/netris/blob/master/CONFIGURATION.md)
See [CONFIGURATION.md](https://code.rocketnine.space/tslocum/netris/src/branch/master/CONFIGURATION.md)
## How to Play
See [GAMEPLAY.md](https://gitlab.com/tslocum/netris/blob/master/GAMEPLAY.md)
See [GAMEPLAY.md](https://code.rocketnine.space/tslocum/netris/src/branch/master/GAMEPLAY.md)
## Support
Please share issues and suggestions [here](https://gitlab.com/tslocum/netris/issues).
Please share issues and suggestions [here](https://code.rocketnine.space/tslocum/netris/issues).
## Libraries
The following libraries are used to build netris:
* [tslocum/cview](https://gitlab.com/tslocum/cview) - User interface
* [tslocum/cview](https://code.rocketnine.space/tslocum/cview) - User interface
* [gdamore/tcell](https://github.com/gdamore/tcell) - User interface
* [gliderlabs/ssh](https://github.com/gliderlabs/ssh) - SSH server
* [creack/pty](https://github.com/creack/pty) - Pseudo-terminal interface


+ 3
- 3
cmd/netris-server/main.go View File

@ -10,9 +10,9 @@ import (
"syscall"
"time"
"gitlab.com/tslocum/netris/pkg/event"
"gitlab.com/tslocum/netris/pkg/game"
"gitlab.com/tslocum/netris/pkg/game/ssh"
"code.rocketnine.space/tslocum/netris/pkg/event"
"code.rocketnine.space/tslocum/netris/pkg/game"
"code.rocketnine.space/tslocum/netris/pkg/game/ssh"
)
var (


+ 2
- 53
cmd/netris/config.go View File

@ -1,14 +1,9 @@
package main
import (
"fmt"
"io/ioutil"
"os"
"path"
"regexp"
"gitlab.com/tslocum/netris/pkg/event"
"gopkg.in/yaml.v2"
"code.rocketnine.space/tslocum/netris/pkg/event"
)
type appConfig struct {
@ -20,53 +15,7 @@ type appConfig struct {
var config = &appConfig{
Input: make(map[event.GameAction][]string),
Colors: make(map[event.GameColor]string),
Name: "Anonymous",
}
var regexpColor = regexp.MustCompile(`^#([0-9a-f]{3}|[0-9a-f]{6})$`)
func defaultConfigPath() string {
homedir, err := os.UserHomeDir()
if err == nil && homedir != "" {
return path.Join(homedir, ".config", "netris", "config.yaml")
}
return ""
}
func readConfig(configPath string) error {
if _, err := os.Stat(configPath); os.IsNotExist(err) {
if configPath != defaultConfigPath() {
return fmt.Errorf("failed to read configuration: %s", err)
}
return nil
}
configData, err := ioutil.ReadFile(configPath)
if err != nil {
return fmt.Errorf("failed to read configuration: %s", err)
}
err = yaml.Unmarshal(configData, config)
if err != nil {
return fmt.Errorf("failed to parse configuration: %s", err)
}
return nil
}
func saveConfig(configPath string) error {
config.Name = nickname
out, err := yaml.Marshal(config)
if err != nil {
return fmt.Errorf("failed to marshal configuration: %s", err)
}
os.MkdirAll(path.Dir(configPath), 0755) // Ignore error
err = ioutil.WriteFile(configPath, out, 0644)
if err != nil {
return fmt.Errorf("failed to write to %s: %s", configPath, err)
}
return nil
}

+ 5
- 7
cmd/netris/gui.go View File

@ -10,10 +10,10 @@ import (
"sync"
"time"
"gitlab.com/tslocum/cview"
"gitlab.com/tslocum/netris/pkg/event"
"gitlab.com/tslocum/netris/pkg/game"
"gitlab.com/tslocum/netris/pkg/mino"
"code.rocketnine.space/tslocum/cview"
"code.rocketnine.space/tslocum/netris/pkg/event"
"code.rocketnine.space/tslocum/netris/pkg/game"
"code.rocketnine.space/tslocum/netris/pkg/mino"
)
var (
@ -43,8 +43,6 @@ var (
screenW, screenH int
nickname = "Anonymous"
drawGhostPiece = true
drawGhostPieceUnsaved bool
@ -97,7 +95,7 @@ func setBorderColor(color string) {
}
func resetPlayerSettingsForm() {
playerSettingsNameInput.SetText(nickname)
playerSettingsNameInput.SetText(config.Name)
}
// BS 1: 10x10


+ 4
- 4
cmd/netris/gui_init.go View File

@ -5,10 +5,10 @@ import (
"unicode"
"github.com/gdamore/tcell/v2"
"gitlab.com/tslocum/cview"
"gitlab.com/tslocum/netris/pkg/event"
"gitlab.com/tslocum/netris/pkg/game"
"gitlab.com/tslocum/netris/pkg/mino"
"code.rocketnine.space/tslocum/cview"
"code.rocketnine.space/tslocum/netris/pkg/event"
"code.rocketnine.space/tslocum/netris/pkg/game"
"code.rocketnine.space/tslocum/netris/pkg/mino"
)
func initGUI(skipTitle bool) (*cview.Application, error) {


+ 3
- 3
cmd/netris/gui_input.go View File

@ -8,9 +8,9 @@ import (
"strings"
"github.com/gdamore/tcell/v2"
"gitlab.com/tslocum/cbind"
"gitlab.com/tslocum/netris/pkg/event"
"gitlab.com/tslocum/netris/pkg/game"
"code.rocketnine.space/tslocum/cbind"
"code.rocketnine.space/tslocum/netris/pkg/event"
"code.rocketnine.space/tslocum/netris/pkg/game"
)
type Keybinding struct {


+ 1
- 1
cmd/netris/gui_test.go View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"gitlab.com/tslocum/netris/pkg/mino"
"code.rocketnine.space/tslocum/netris/pkg/mino"
)
func TestRenderMatrix(t *testing.T) {


+ 8
- 8
cmd/netris/gui_title.go View File

@ -6,13 +6,13 @@ import (
"strconv"
"time"
"gitlab.com/tslocum/cbind"
"code.rocketnine.space/tslocum/cbind"
"github.com/gdamore/tcell/v2"
"gitlab.com/tslocum/cview"
"gitlab.com/tslocum/netris/pkg/event"
"gitlab.com/tslocum/netris/pkg/game"
"gitlab.com/tslocum/netris/pkg/mino"
"code.rocketnine.space/tslocum/cview"
"code.rocketnine.space/tslocum/netris/pkg/event"
"code.rocketnine.space/tslocum/netris/pkg/game"
"code.rocketnine.space/tslocum/netris/pkg/mino"
)
const (
@ -137,11 +137,11 @@ func selectTitleButton() {
return
} else if currentSelection == 2 { // Save
nicknameDraft := playerSettingsNameInput.GetText()
if nicknameDraft != "" && game.Nickname(nicknameDraft) != nickname {
nickname = game.Nickname(nicknameDraft)
if nicknameDraft != "" && game.Nickname(nicknameDraft) != config.Name {
config.Name = game.Nickname(nicknameDraft)
if activeGame != nil {
activeGame.Event <- &event.NicknameEvent{Nickname: nickname}
activeGame.Event <- &event.NicknameEvent{Nickname: config.Name}
}
}
}


+ 18
- 13
cmd/netris/main.go View File

@ -1,6 +1,7 @@
package main
import (
"code.rocketnine.space/tslocum/ez"
"flag"
"fmt"
"io/ioutil"
@ -17,10 +18,10 @@ import (
"syscall"
"time"
"code.rocketnine.space/tslocum/netris/pkg/event"
"code.rocketnine.space/tslocum/netris/pkg/game"
"code.rocketnine.space/tslocum/netris/pkg/mino"
"github.com/mattn/go-isatty"
"gitlab.com/tslocum/netris/pkg/event"
"gitlab.com/tslocum/netris/pkg/game"
"gitlab.com/tslocum/netris/pkg/mino"
)
var (
@ -103,17 +104,21 @@ func main() {
logLevel = game.LogDebug
}
if configPath == "" {
configPath = defaultConfigPath()
}
if debugAddress != "" {
go func() {
log.Fatal(http.ListenAndServe(debugAddress, nil))
}()
}
err := readConfig(configPath)
if configPath == "" {
var err error
configPath, err = ez.DefaultConfigPath("netris")
if err != nil {
log.Fatalf("failed to determine default configuration path: %s", err)
}
}
err := ez.Deserialize(config, configPath)
if err != nil {
log.Fatalf("failed to read configuration file: %s", err)
}
@ -140,9 +145,9 @@ func main() {
setBorderColor(config.Colors[event.GameColorBorder])
if nicknameFlag != "" && game.Nickname(nicknameFlag) != "" {
nickname = game.Nickname(nicknameFlag)
config.Name = game.Nickname(nicknameFlag)
} else if config.Name != "" && game.Nickname(config.Name) != "" {
nickname = game.Nickname(config.Name)
config.Name = game.Nickname(config.Name)
}
app, err := initGUI(connectAddress != "")
@ -203,7 +208,7 @@ func main() {
closeGUI()
err := saveConfig(configPath)
err := ez.Serialize(config, configPath)
if err != nil {
log.Printf("warning: failed to save configuration: %s", err)
}
@ -255,7 +260,7 @@ func main() {
newGame = &game.ListedGame{Name: game.GameName(newGameNameInput.GetText()), MaxPlayers: maxPlayers, SpeedLimit: speedLimit}
}
activeGame, err = activeGameConn.JoinGame(nickname, gameID, newGame, logger, draw)
activeGame, err = activeGameConn.JoinGame(config.Name, gameID, newGame, logger, draw)
if err != nil {
log.Fatalf("failed to connect to %s: %s", connectAddress, err)
}
@ -301,7 +306,7 @@ func main() {
log.Fatalf("failed to create local game: %s", err)
}
activeGame, err = activeGameConn.JoinGame(nickname, event.GameIDNewLocal, nil, logger, draw)
activeGame, err = activeGameConn.JoinGame(config.Name, event.GameIDNewLocal, nil, logger, draw)
if err != nil {
log.Fatalf("failed to join local game: %s", err)
}


+ 6
- 7
go.mod View File

@ -1,16 +1,15 @@
module gitlab.com/tslocum/netris
module code.rocketnine.space/tslocum/netris
go 1.13
require (
code.rocketnine.space/tslocum/cbind v0.1.5
code.rocketnine.space/tslocum/cview v1.5.6-0.20210526200516-29170b84538e
code.rocketnine.space/tslocum/ez v0.0.0-20210506054357-569018bd037a
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
github.com/creack/pty v1.1.11
github.com/gdamore/tcell/v2 v2.0.0-dev.0.20200926152101-0fb77ddaa5b4
github.com/gdamore/tcell/v2 v2.3.3
github.com/gliderlabs/ssh v0.3.1
github.com/mattn/go-isatty v0.0.12
gitlab.com/tslocum/cbind v0.1.2
gitlab.com/tslocum/cview v1.5.1-0.20201007233521-ed5e6d94dd16
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0
golang.org/x/sys v0.0.0-20201007165808-a893ed343c85 // indirect
gopkg.in/yaml.v2 v2.3.0
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
)

+ 33
- 24
go.sum View File

@ -1,45 +1,54 @@
code.rocketnine.space/tslocum/cbind v0.1.5 h1:i6NkeLLNPNMS4NWNi3302Ay3zSU6MrqOT+yJskiodxE=
code.rocketnine.space/tslocum/cbind v0.1.5/go.mod h1:LtfqJTzM7qhg88nAvNhx+VnTjZ0SXBJtxBObbfBWo/M=
code.rocketnine.space/tslocum/cview v1.5.6-0.20210526200516-29170b84538e h1:A99oYBh7/kkcsFfectQ7cXLQH7mXG/OSRte4qn+NYp8=
code.rocketnine.space/tslocum/cview v1.5.6-0.20210526200516-29170b84538e/go.mod h1:KBRxzIsj8bfgFpnMpkGVoxsrPUvnQsRnX29XJ2yzB6M=
code.rocketnine.space/tslocum/ez v0.0.0-20210502054046-e1e0d1009c8f h1:zvqqu4UY7lwNo6thsoRYeUZm9qqZ0F66diIEVhN9oDQ=
code.rocketnine.space/tslocum/ez v0.0.0-20210502054046-e1e0d1009c8f/go.mod h1:SQrM+bQ4eZdyAVTxuF2BNnyAnojHP6Kcmm2vMszoFWw=
code.rocketnine.space/tslocum/ez v0.0.0-20210506054357-569018bd037a h1:Ug5hgK5sM7bdK1gEl/pNLYTtBpFUxCvSCGYkEbUqdmw=
code.rocketnine.space/tslocum/ez v0.0.0-20210506054357-569018bd037a/go.mod h1:SQrM+bQ4eZdyAVTxuF2BNnyAnojHP6Kcmm2vMszoFWw=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko=
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
github.com/gdamore/tcell/v2 v2.0.0-dev/go.mod h1:vSVL/GV5mCSlPC6thFP5kfOFdM9MGZcalipmpTxTgQA=
github.com/gdamore/tcell/v2 v2.0.0-dev.0.20200926152101-0fb77ddaa5b4 h1:9WLVV5c2UI2qvgROlgzLgCuK5gi7igcU5LNsPXCSFB8=
github.com/gdamore/tcell/v2 v2.0.0-dev.0.20200926152101-0fb77ddaa5b4/go.mod h1:vSVL/GV5mCSlPC6thFP5kfOFdM9MGZcalipmpTxTgQA=
github.com/gdamore/tcell/v2 v2.2.0/go.mod h1:cTTuF84Dlj/RqmaCIV5p4w8uG1zWdk0SF6oBpwHp4fU=
github.com/gdamore/tcell/v2 v2.3.3 h1:RKoI6OcqYrr/Do8yHZklecdGzDTJH9ACKdfECbRdw3M=
github.com/gdamore/tcell/v2 v2.3.3/go.mod h1:cTTuF84Dlj/RqmaCIV5p4w8uG1zWdk0SF6oBpwHp4fU=
github.com/gliderlabs/ssh v0.3.1 h1:L6VrMUGZaMlNIMN8Hj+CHh4U9yodJE3FAt/rgvfaKvE=
github.com/gliderlabs/ssh v0.3.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac=
github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY=
github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
gitlab.com/tslocum/cbind v0.1.2 h1:ptDjO7WeOl1HglprsK18L8I9JeRkmtuBoBBaYw/6/Ow=
gitlab.com/tslocum/cbind v0.1.2/go.mod h1:HfB7qAhHSZbn1rFK8M9SvSN5NG6ScAg/3h3iE6xdeeI=
gitlab.com/tslocum/cview v1.5.1-0.20201007233521-ed5e6d94dd16 h1:E/Qr5SF615Zhu+diugdB7NTWfomZ2Y3qVYuMOkY16to=
gitlab.com/tslocum/cview v1.5.1-0.20201007233521-ed5e6d94dd16/go.mod h1:i9NyxtwBtkiVFrwmsh3Bv3dunvipjZrKX0TTdPHbzcw=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE=
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201007165808-a893ed343c85 h1:v7tXcN5Dmvk08x9LWujjDQbk/26sd3IqhKa1NfaKmpM=
golang.org/x/sys v0.0.0-20201007165808-a893ed343c85/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210309040221-94ec62e08169/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea h1:+WiDlPBBaO+h9vPNZi8uJ3k4BkKQB7Iow3aqwHVA5hI=
golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210503060354-a79de5458b56 h1:b8jxX3zqjpqb2LklXPzKSGJhzyxCOZSz8ncv8Nv+y7w=
golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

+ 2
- 2
goreleaser.yml View File

@ -8,7 +8,7 @@ builds:
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X gitlab.com/tslocum/netris/pkg/game.Version={{.Version}}
- -s -w -X code.rocketnine.space/tslocum/netris/pkg/game.Version={{.Version}}
goos:
- darwin
- freebsd
@ -23,7 +23,7 @@ builds:
binary: netris-server
main: ./cmd/netris-server
ldflags:
- -s -w -X gitlab.com/tslocum/netris/pkg/game.Version={{.Version}}
- -s -w -X code.rocketnine.space/tslocum/netris/pkg/game.Version={{.Version}}
goos:
- darwin
- freebsd


+ 1
- 1
pkg/game/command.go View File

@ -4,7 +4,7 @@ import (
"strconv"
"time"
"gitlab.com/tslocum/netris/pkg/mino"
"code.rocketnine.space/tslocum/netris/pkg/mino"
)
type Command int


+ 1
- 1
pkg/game/conn.go View File

@ -9,7 +9,7 @@ import (
"sync"
"time"
"gitlab.com/tslocum/netris/pkg/event"
"code.rocketnine.space/tslocum/netris/pkg/event"
)
const ConnTimeout = 30 * time.Second


+ 2
- 2
pkg/game/game.go View File

@ -10,8 +10,8 @@ import (
"sync"
"time"
"gitlab.com/tslocum/netris/pkg/event"
"gitlab.com/tslocum/netris/pkg/mino"
"code.rocketnine.space/tslocum/netris/pkg/event"
"code.rocketnine.space/tslocum/netris/pkg/mino"
)
const (


+ 1
- 1
pkg/game/player.go View File

@ -4,7 +4,7 @@ import (
"regexp"
"time"
"gitlab.com/tslocum/netris/pkg/mino"
"code.rocketnine.space/tslocum/netris/pkg/mino"
)
const (


+ 1
- 1
pkg/game/server.go View File

@ -10,7 +10,7 @@ import (
"sync"
"time"
"gitlab.com/tslocum/netris/pkg/event"
"code.rocketnine.space/tslocum/netris/pkg/event"
)
const (


+ 1
- 1
pkg/game/ssh/server.go View File

@ -18,7 +18,7 @@ import (
"github.com/creack/pty"
"github.com/gliderlabs/ssh"
"gitlab.com/tslocum/netris/pkg/game"
"code.rocketnine.space/tslocum/netris/pkg/game"
gossh "golang.org/x/crypto/ssh"
)


+ 1
- 1
pkg/game/ssh/server_windows.go View File

@ -2,7 +2,7 @@
package ssh
import "gitlab.com/tslocum/netris/pkg/game"
import "code.rocketnine.space/tslocum/netris/pkg/game"
// SSH server is unsupported on Windows


+ 1
- 1
pkg/mino/block.go View File

@ -1,6 +1,6 @@
package mino
import "gitlab.com/tslocum/netris/pkg/event"
import "code.rocketnine.space/tslocum/netris/pkg/event"
// Dark color ghosts are 60% original overlaid #777777
// Light color ghosts are 40% original overlaid #888888


+ 1
- 1
pkg/mino/matrix.go View File

@ -9,7 +9,7 @@ import (
"sync"
"time"
"gitlab.com/tslocum/netris/pkg/event"
"code.rocketnine.space/tslocum/netris/pkg/event"
)
const (


Loading…
Cancel
Save