Skip to content

Commit

Permalink
mod: Chanded the pkg from 'ltw' to 'maze-wars'
Browse files Browse the repository at this point in the history
  • Loading branch information
xescugc committed Dec 14, 2023
1 parent 4137046 commit 095e81c
Show file tree
Hide file tree
Showing 42 changed files with 95 additions and 232 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Update the pkgs"
run: sudo apt-get update

# We install xorg-dev because of https://github.com/go-gl/glfw/issues/129#issuecomment-75928365
# We install xvfb because of the error "The DISPLAY environment variable is missing" so we need
Expand Down
2 changes: 1 addition & 1 deletion action/action.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package action

import (
"github.com/xescugc/ltw/utils"
"github.com/xescugc/maze-wars/utils"
"nhooyr.io/websocket"
)

Expand Down
2 changes: 1 addition & 1 deletion client/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package client

import (
"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/action"
"github.com/xescugc/maze-wars/action"
)

// ActionDispatcher is in charge of dispatching actions to the
Expand Down
8 changes: 4 additions & 4 deletions client/camera.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package client
import (
"github.com/hajimehoshi/ebiten/v2"
"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/action"
"github.com/xescugc/ltw/store"
"github.com/xescugc/ltw/utils"
"github.com/xescugc/maze-wars/action"
"github.com/xescugc/maze-wars/store"
"github.com/xescugc/maze-wars/utils"
)

// CameraStore is in charge of what it's seen
Expand Down Expand Up @@ -54,7 +54,7 @@ func NewCameraStore(d *flux.Dispatcher, s *store.Store, w, h int) *CameraStore {
}

func (cs *CameraStore) Update() error {
// TODO: https://github.com/xescugc/ltw/issues/4
// TODO: https://github.com/xescugc/maze-wars/issues/4
//s := cs.GetState().(CameraState)
//if _, wy := ebiten.Wheel(); wy != 0 {
//fmt.Println(s.Zoom)
Expand Down
2 changes: 1 addition & 1 deletion client/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"image"

"github.com/hajimehoshi/ebiten/v2"
"github.com/xescugc/ltw/store"
"github.com/xescugc/maze-wars/store"
)

// Game is the main struct that is the initializer
Expand Down
14 changes: 7 additions & 7 deletions client/hud.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/text"
"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/action"
"github.com/xescugc/ltw/assets"
"github.com/xescugc/ltw/inputer"
"github.com/xescugc/ltw/store"
"github.com/xescugc/ltw/tower"
"github.com/xescugc/ltw/unit"
"github.com/xescugc/ltw/utils"
"github.com/xescugc/maze-wars/action"
"github.com/xescugc/maze-wars/assets"
"github.com/xescugc/maze-wars/inputer"
"github.com/xescugc/maze-wars/store"
"github.com/xescugc/maze-wars/tower"
"github.com/xescugc/maze-wars/unit"
"github.com/xescugc/maze-wars/utils"
)

// HUDStore is in charge of keeping track of all the elements
Expand Down
10 changes: 5 additions & 5 deletions client/lobby.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/text"
"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/action"
"github.com/xescugc/ltw/assets"
"github.com/xescugc/ltw/inputer"
"github.com/xescugc/ltw/store"
"github.com/xescugc/ltw/utils"
"github.com/xescugc/maze-wars/action"
"github.com/xescugc/maze-wars/assets"
"github.com/xescugc/maze-wars/inputer"
"github.com/xescugc/maze-wars/store"
"github.com/xescugc/maze-wars/utils"
)

type LobbyStore struct {
Expand Down
2 changes: 1 addition & 1 deletion client/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/action"
"github.com/xescugc/maze-wars/action"
)

// LoggerStore is a logger store in charge of logging all the actions
Expand Down
6 changes: 3 additions & 3 deletions client/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/hajimehoshi/ebiten/v2"
"github.com/xescugc/ltw/action"
"github.com/xescugc/ltw/assets"
"github.com/xescugc/maze-wars/action"
"github.com/xescugc/maze-wars/assets"
"golang.org/x/image/font"
"golang.org/x/image/font/opentype"
"nhooyr.io/websocket"
Expand Down Expand Up @@ -58,7 +58,7 @@ func init() {
}

func New(ctx context.Context, ad *ActionDispatcher, rs *RouterStore, opt Options) error {
ebiten.SetWindowTitle("LTW")
ebiten.SetWindowTitle("Maze Wars")
ebiten.SetWindowSize(opt.ScreenW*2, opt.ScreenH*2)
ebiten.SetWindowResizingMode(ebiten.WindowResizingModeEnabled)

Expand Down
2 changes: 1 addition & 1 deletion client/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"github.com/hajimehoshi/ebiten/v2"
"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/action"
"github.com/xescugc/maze-wars/action"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions client/towers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"image"

"github.com/hajimehoshi/ebiten/v2"
"github.com/xescugc/ltw/assets"
"github.com/xescugc/ltw/store"
"github.com/xescugc/ltw/tower"
"github.com/xescugc/maze-wars/assets"
"github.com/xescugc/maze-wars/store"
"github.com/xescugc/maze-wars/tower"
)

type Towers struct {
Expand Down
8 changes: 4 additions & 4 deletions client/units.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"image/color"

"github.com/hajimehoshi/ebiten/v2"
"github.com/xescugc/ltw/assets"
"github.com/xescugc/ltw/store"
"github.com/xescugc/ltw/unit"
"github.com/xescugc/ltw/utils"
"github.com/xescugc/maze-wars/assets"
"github.com/xescugc/maze-wars/store"
"github.com/xescugc/maze-wars/unit"
"github.com/xescugc/maze-wars/utils"
)

type Units struct {
Expand Down
6 changes: 3 additions & 3 deletions client/wasm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"syscall/js"

"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/client"
"github.com/xescugc/ltw/inputer"
"github.com/xescugc/ltw/store"
"github.com/xescugc/maze-wars/client"
"github.com/xescugc/maze-wars/inputer"
"github.com/xescugc/maze-wars/store"
)

func main() {
Expand Down
81 changes: 0 additions & 81 deletions cmd/client.go

This file was deleted.

6 changes: 3 additions & 3 deletions cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/spf13/cobra"
"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/client"
"github.com/xescugc/ltw/inputer"
"github.com/xescugc/ltw/store"
"github.com/xescugc/maze-wars/client"
"github.com/xescugc/maze-wars/inputer"
"github.com/xescugc/maze-wars/store"
)

var (
Expand Down
23 changes: 0 additions & 23 deletions cmd/root.go

This file was deleted.

35 changes: 0 additions & 35 deletions cmd/server.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/server"
"github.com/xescugc/maze-wars/server"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/xescugc/ltw
module github.com/xescugc/maze-wars

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion inputer/inputer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/hajimehoshi/ebiten/v2/inpututil"
)

//go:generate mockgen -destination=../mock/inputer.go -package mock github.com/xescugc/ltw/inputer Inputer
//go:generate mockgen -destination=../mock/inputer.go -package mock github.com/xescugc/maze-wars/inputer Inputer
type Inputer interface {
CursorPosition() (int, int)

Expand Down
10 changes: 5 additions & 5 deletions integration/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/action"
"github.com/xescugc/ltw/client"
"github.com/xescugc/ltw/mock"
"github.com/xescugc/ltw/server"
"github.com/xescugc/ltw/store"
"github.com/xescugc/maze-wars/action"
"github.com/xescugc/maze-wars/client"
"github.com/xescugc/maze-wars/mock"
"github.com/xescugc/maze-wars/server"
"github.com/xescugc/maze-wars/store"
)

//"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion mock/inputer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions server/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"log"

"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/action"
"github.com/xescugc/ltw/store"
"github.com/xescugc/maze-wars/action"
"github.com/xescugc/maze-wars/store"
"nhooyr.io/websocket"
"nhooyr.io/websocket/wsjson"
)
Expand Down
Binary file modified server/assets/wasm/maze-wars.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion server/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package server

import (
"github.com/xescugc/go-flux"
"github.com/xescugc/ltw/store"
"github.com/xescugc/maze-wars/store"
)

type Game struct {
Expand Down
Loading

0 comments on commit 095e81c

Please sign in to comment.