Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Board struct {
- Name string
- Game1, Game2 Leaders
- }
- type Leaders struct {
- Players []Player
- }
- type Player struct {
- Name string
- Score int
- }
- func json() []Board {
- leaderboard := []Board{
- Board{
- Name: "Pong",
- Game1: Leaders{
- Players: []Player{
- Player{Name: "Gentry", Score: 456},
- Player{Name: "Caaz", Score: 568},
- Player{Name: "David", Score: 900},
- },
- },
- },
- Board{
- Name: "Snake",
- Game2: Leaders{
- Players: []Player{
- Player{Name: "Jason", Score: 300},
- Player{Name: "Bobbie", Score: 1000},
- },
- },
- },
- }
- return leaderboard
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement