Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.63 KB | None | 0 0
  1.  
  2. type Board struct {
  3.     Name         string
  4.     Game1, Game2 Leaders
  5. }
  6. type Leaders struct {
  7.     Players []Player
  8. }
  9. type Player struct {
  10.     Name  string
  11.     Score int
  12. }
  13.  
  14. func json() []Board {
  15.     leaderboard := []Board{
  16.         Board{
  17.             Name: "Pong",
  18.             Game1: Leaders{
  19.  
  20.                 Players: []Player{
  21.                     Player{Name: "Gentry", Score: 456},
  22.                     Player{Name: "Caaz", Score: 568},
  23.                     Player{Name: "David", Score: 900},
  24.                 },
  25.             },
  26.         },
  27.         Board{
  28.             Name: "Snake",
  29.             Game2: Leaders{
  30.                 Players: []Player{
  31.                     Player{Name: "Jason", Score: 300},
  32.                     Player{Name: "Bobbie", Score: 1000},
  33.                 },
  34.             },
  35.         },
  36.     }
  37.     return leaderboard
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement