<!DOCTYPE html>
<html>
<head>
    <title>Splendid</title>
    <script type="text/javascript" src="app/vendor/angular.min.js"></script>
    <script type="text/javascript" src="http://localhost:8889/socket.io/socket.io.js"></script>
    <script type="text/javascript" src="app/app.js"></script>
</head>
<body ng-app="splendid" ng-controller="splendidController as vm">

    <h1>Splendid</h1>

    <div>Welcome {{ vm.player.name }}</div>

    <button ng-click="vm.createGame()">Create Game</button>

    <h3>Open Games</h3>

    <div ng-repeat="game in vm.openGames">
        <span>{{ game.owner }}'s game ({{ game.remaining }} slots open)</span>
        <a href="#" ng-click="vm.joinGame(game)">join</a>
    </div>

    <div>{{ vm.msg }}</div>

</body>
</html>
