Skip to content

Commit 338ac53

Browse files
DonWick32SRIMANKSnovice0192MegaaDevitsKhadeer
authored
feat(aor24): socket, validator, artifacts (#71)
* feat: socket init * feat: validator init * wip: validator init * feat: attacker_movement in validator * wip: change request struct for socket * feat: integrate socket formats with frontend * refactor: remove unwanted structs, modularise validator * wip: init attack * feat: random matchmaking based on trophies * fix: change shortest path, socket api * wip: validator logic (#70) * wip: validator * validator additions * validator: added changes v2 * validator additions v3 + socket resolved errors * validator additions v3 fix * feat: fetch base details, init socket actor * feat: socket start route, fix errors * chore: unused stuff * fix: base fetching, shortest path, user jwt, modify socket (#74) Co-authored-by: kssisowrirajan <[email protected]> Co-authored-by: DonWick32 <[email protected]> * wip: base saving * wip: dummy base data, validate base saving * fix: save base with validation * feat: default bot base for new user * feat: check available blocks for blocks, attackers, bombs * feat: add Inventory routes (#78) * fix(schema): add name to defneder and mine * feat: add inventory upgrade and fetch routes * feat(inventory): add upgrade routes * fix(inventory): fix upgrade route * fix: dump file fix * feat: send error message to frontend, dump fix * feat(aor24): socket, validator * validator rebase and changes * (validator): return type changes * (validator): game_handler init * validator: mod.rs changes * validator: mod additions and functional changes * validator ready to test * validator response type * validator response type additions, bug fix v1 * feat: handle game terminal, define game logs * validator: terminate response * fix: remove redundant models * feat: change shortest path to bfs, send artifact for simulation, fmt * integration ongoing * added remaining returns to mod * fix: add sequence offset for new user creation * feat: check artifact count for save base, fetch block id of bank from name * validator mod fix * fix: handle redis for attack, game termination * feat: sriman pro skills * feat: add route for game response, send game id * fixing nitish's bugs * fetch errors fixed, redis gotta be fixed * fix: this commit dosent work this is just to send the lastest code for the defender * feat: new artifact transfer route, change profile route, alter bank name check * bug fixes and defender logic * fix: proper redis handling in attack, game termination * feat: check base under attack for saving, transfer, upgrade * feat: save game logs * fix(validator): defender movement function * feat: max cap on per day attacks by user and attacks on a base * feat: max cap on per day attacks by user and attacks on a base * defender validation diff speeds * diff speed logic validator * fix: set total building hp, add logged in route, fix rating calc * validator new branch backup * fix(validator): defender movement * fix(validator): defender movement skip condition wrong order * defender simulation tweeks * defender simulation * feat: handle artifacts shifting after game over * validator cleanups * feat: max collectible artifacts, fix lint * feat: bomb limit per attacker * fix: upgrade should not update all for users * feat: add workflow for socket * invalidation handled and tested validator with frontend * remove dead code * fix clippy errors * gamelog variables memory reduction * feat: dummy dump for prod --------- Co-authored-by: DonWIck32 <[email protected]> Co-authored-by: kssisowrirajan <[email protected]> Co-authored-by: ashw1nr2023 <[email protected]> Co-authored-by: novice0192 <[email protected]> * prod(aor24): fixes (#81) * fix: send mapspace id after inventory upgrade * self destruction * fix: seeder, mine and defender name sending * fix: add game table debug print statements * fix: send next block id after upgrade, add trophies to game table, change history and leaderboard response * timeout game termination and defender fix ++ * fix: update attacks, defenses won, dummy data, random avatar * fix: no bot in leaderboard * fix: rip simulation log * feat: avatar * fix: fmt --------- Co-authored-by: ashw1nr2023 <[email protected]> Co-authored-by: MegaaDev <[email protected]> * fix: username * fix(upgrade): upgrade only for one user (#82) * fix(upgrade): upgrade only for one user * fix: remove println * fix: defender * fix: correct attacker and bomb details * chore: add debug logs * fix: info logs * feat(bin): script for increasing artifacts of users (#83) * feat(bin): script increasing artifacts * fix: change bonus artifact count * fix: add log after threads --------- Co-authored-by: DonWIck32 <[email protected]> * feat: bonus artifact for day 2 * feat: artifact adjustment * fix: negaitive artifact bug (#84) --------- Co-authored-by: kssisowrirajan <[email protected]> Co-authored-by: novice0192 <[email protected]> Co-authored-by: Akshay A <[email protected]> Co-authored-by: itsKhadeer <[email protected]> Co-authored-by: ashw1nr2023 <[email protected]> Co-authored-by: MegaaDev <[email protected]>
1 parent bd18e14 commit 338ac53

File tree

55 files changed

+5740
-22416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5740
-22416
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ GOOGLE_OAUTH_REDIRECT_URL=
2929
GOOGLE_OAUTH_AUTH_URL=https://accounts.google.com/o/oauth2/v2/auth
3030
GOOGLE_OAUTH_TOKEN_URL=https://www.googleapis.com/oauth2/v3/token
3131
GOOGLE_OAUTH_USER_INFO_URL=https://www.googleapis.com/oauth2/v3/userinfo
32+
33+
34+
BOMB_MAX_COUNT = 10

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ on:
55
branches:
66
- aor23
77
- aor24
8+
- socket
89
pull_request:
910
branches:
1011
- aor23
1112
- aor24
13+
- socket
1214

1315
jobs:
1416
check:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ target
33
.env
44
.idea
55
dump.rdb
6+
.vscode

Cargo.lock

Lines changed: 100 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ default-run = "aot-backend"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10+
tungstenite = "0.16"
11+
actix = "0.13.0"
12+
actix-web-actors = "4"
1013
actix-web = {version = "4", features = ["rustls"] }
14+
actix-rt = "2.9.0"
15+
actix-ws = "0.2.5"
16+
futures-util = "0.3.30"
1117
anyhow = "1.0.68"
1218
derive_more = "0.99.17"
1319
chrono = { version = "0.4.23", features = ["serde"] }
@@ -23,6 +29,7 @@ thiserror = "1.0.38"
2329
array2d = "0.3.0"
2430
petgraph = "0.6.2"
2531
serde = { version = "1.0.151", features = ["derive"] }
32+
serde_json = "1.0"
2633
pwhash = "1"
2734
actix-cors = "0.6.4"
2835
diesel_migrations = "2.0.0"

0 commit comments

Comments
 (0)