Skip to content

Commit

Permalink
feat(#242): matches
Browse files Browse the repository at this point in the history
  • Loading branch information
lxgr-linux committed Dec 16, 2024
1 parent e6a1612 commit eb48e8d
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
10 changes: 9 additions & 1 deletion gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,12 @@
#ignite scaffold message UserCreate newUser:string alias:string
#ignite scaffold message CardSchemeBuy bid:coin --response cardId:uint
#ignite scaffold message CardSaveContent cardId:uint content:string notes:string artist:string balanceAnchor:bool --response airdropClaimed:bool
#ignite scaffold message CardVote vote:SingleVote --response airdropClaimed:bool
ignite scaffold message CardVote vote:SingleVote --response airdropClaimed:bool
ignite scaffold message CardTransfer cardId:uint receiver:string
ignite scaffold message CardDonate cardId:uint amount:coin
ignite scaffold message CardArtworkAdd cardId:uint image:string fullArt:bool
ignite scaffold message CardArtistChange cardId:uint artist:string
ignite scaffold message CouncilRegister
ignite scaffold message CouncilDeregister
ignite scaffold message MatchReport matchId:uint playedCardsA:uints \
playedCardsB:uints outcome:Outcome
32 changes: 32 additions & 0 deletions proto/cardchain/cardchain/match.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
syntax = "proto3";
package cardchain.cardchain;

option go_package = "github.com/DecentralCardGame/cardchain/x/cardchain/types";
import "cardchain/cardchain/voting.proto";

message Match {

uint64 timestamp = 1;
string reporter = 2;
MatchPlayer playerA = 3;
MatchPlayer playerB = 4;
Outcome outcome = 7;
bool coinsDistributed = 10;
bool serverConfirmed = 8;
}

message MatchPlayer {
string addr = 1;
repeated uint64 playedCards = 2;
bool confirmed = 3;
Outcome outcome = 4;
repeated uint64 deck = 5;
repeated SingleVote votedCards = 6;
}

enum Outcome {
AWon = 0;
BWon = 1;
Draw = 2;
Aborted = 3;
}

0 comments on commit eb48e8d

Please sign in to comment.