Skip to content

Commit 2c3bbf4

Browse files
committed
feat: add new agent images and update agent data; modify component image handling
1 parent 41ddbc3 commit 2c3bbf4

File tree

17 files changed

+289
-129
lines changed

17 files changed

+289
-129
lines changed

blockend/contracts/SquidChain.sol

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ contract SquidChain {
5858
gameRoom.gameId = uuid;
5959
gameRoom.gameStarted = false;
6060
gameRoom.gameEnded = false;
61-
gameRoom.currentRound = 0;
61+
gameRoom.currentRound = 1;
6262

6363
for (uint i = 0; i < agentIds.length; i++) {
6464
require(agents[agentIds[i]].agentId != 0, "Agent does not exist");
@@ -71,6 +71,11 @@ contract SquidChain {
7171
gamesByUser[msg.sender].push(gameRoom);
7272
}
7373

74+
function changeGameRound (string memory gameId, uint8 newRound) public {
75+
require(keccak256(abi.encodePacked(gameRooms[gameId].gameId)) != keccak256(abi.encodePacked("")), "Game does not exist");
76+
gameRooms[gameId].currentRound = newRound;
77+
}
78+
7479
function eliminatePlayer(uint8 eliminateAgentId, string memory gameId) public {
7580
require(agents[eliminateAgentId].agentId != 0, "Agent does not exist");
7681
require(!eliminatedInGame[gameId][eliminateAgentId], "Agent is already eliminated in this game");

web/app/api/moderator/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function POST(req: NextRequest) {
2727
"https://rpc-0x4e454175.aurora-cloud.dev/"
2828
);
2929
const wallet = new ethers.Wallet(
30-
process.env.moderatorprivatekey!,
30+
process.env.NEXT_PUBLIC_moderatorprivatekey!,
3131
provider
3232
);
3333

0 commit comments

Comments
 (0)