3 ms·
Author here. True enough on documentation. About the specific question - they can calculate it from their number of tiles and the bonus for each tile. THAT will
by kobigurk 10y ago
Author here. True enough on documentation.
About the specific question - they can calculate it from their number of tiles and the bonus for each tile. THAT will require tracking it or scanning for it, which costs some gas too :-)
- Tepix 10y agoI'm not very familiar with Ethereum. Can the players always see the code of the other player? Can you explain the map? The registration fee is 1 ETH ($11 currently)? What does claimTile() do exactly?
- kobigurk 10y agoOf course! The map shows the current state of the game board - one color for each player for his owned tiles. The tiles with * are "life tiles" - you receive them when the game starts and they grant you a greater bonus, so there's an incentive to destory the enemy's life tiles first. As each participant in the network sees the entire blockchain, the players can see the "compiled code", essentially the EVM opcodes, but only after all the players already committed to the hash of their code and new players can't commit anymore. This is a "commit-reveal" method that allows the game creator to accept registrations for a specific bot without actually revealing the player's code beforehand. The registration fee is indeed 1 ETH at the moment, but that's a placeholder. The winner gets almost all the pool of registration fees (winning a game with 5 players = 4.5 ETH). claimTile is the API exposed to the bot contracts - it's a way for them to change the board state to signify they own the tile. Of course, as every operation, it costs some gas. So you can have a strategy of claiming as many as possible by using only claimTile, but you could also seek enemy tiles and claim them. It's a trade-off of gas.
- Tepix 10y agoThe bots can also examine the entire board (but that's something that consumes gas)? If you run claimTile() on an enemy tile that is alive, it dies? Calling move() will try to move a cell that is alive - can i only move the "alive" part of the cell into a cell that I claimed first using claimTile()? The game ends after 10 rounds - the number of actions per round is only limited by available gas? You are running the game on a test chain right now so there is no real ethereum (=money) involved yet?
- kobigurk 10y ago- Yes, can examine and consumes gas. - It becomes your tile. - You can move only "life tiles", those with an asteriks, the 5 you have been allocated. - Limited by the gas you have been allocated at this round. Careful, though, if you exceed the amount of gas allocated, your actions are reverted. 10 rounds is more of an example. An actual game would have more I believe. - Test chain indeed. No money involved.