diff --git a/packages/hardhat/contracts/Game.sol b/packages/hardhat/contracts/Game.sol index 5d9649b6..59261c64 100644 --- a/packages/hardhat/contracts/Game.sol +++ b/packages/hardhat/contracts/Game.sol @@ -57,6 +57,7 @@ contract Game is IOptionalSystemHook { getEntityFromPlayer(msgSender) != bytes32(0), "You Must First Spawn An Avatar In Biome-1 To Play The Game." ); + emit GameNotif(string.concat(Strings.toHexString(msgSender), " has joined the game")); } function onAfterCallSystem( @@ -77,6 +78,8 @@ contract Game is IOptionalSystemHook { (bool sent, ) = msgSender.call{ value: address(this).balance }(""); require(sent, "Failed to send Ether"); + emit GameNotif(string.concat(Strings.toHexString(winner), " won the game!")); + return; }