/*
 Copyright 2016 Paul Bevis

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */

'use strict';

import * as types from '../constants/action-types';

export function startGame() {
  return {
    type: types.GAME_START
  };
}
export function startNextGame() {
  return {
    type: types.GAME_NEXT_START
  };
}
export function finishedPlayingSound() {
  return {
    type: types.FINISHED_PLAYING_SOUND
  };
}
export function letterClicked(letter) {
  return {
    type: types.LETTER_CLICKED,
    letter
  };
}
export function playWord(key) {
  return {
    type: types.PLAY_WORD,
    key
  };
}
@@ -629,32 +629,29 @@
 s';%0A%0Aexport 
-function
+const
  startGame()
@@ -648,34 +648,28 @@
 tartGame
-() %7B%0A  return %7B%0A  
+ = () =%3E (%7B%0A
   type: 
@@ -681,38 +681,36 @@
 .GAME_START%0A
-  
 %7D
+)
 ;%0A
-%7D
 %0Aexport 
 function sta
@@ -697,24 +697,21 @@
 %0Aexport 
-function
+const
  startNe
@@ -716,34 +716,28 @@
 NextGame
-() %7B%0A  return %7B%0A  
+ = () =%3E (%7B%0A
   type: 
@@ -758,30 +758,28 @@
 T_START%0A
-  
 %7D
+)
 ;%0A
-%7D
 %0Aexport 
 function
@@ -770,24 +770,21 @@
 %0Aexport 
-function
+const
  finishe
@@ -800,26 +800,20 @@
 ound
-() %7B%0A  return %7B%0A  
+ = () =%3E (%7B%0A
   ty
@@ -845,30 +845,28 @@
 G_SOUND%0A
-  
 %7D
+)
 ;%0A
-%7D
 %0Aexport 
 function
@@ -857,24 +857,21 @@
 %0Aexport 
-function
+const
  letterC
@@ -876,16 +876,19 @@
 rClicked
+ = 
 (letter)
@@ -888,31 +888,22 @@
 letter) 
-%7B%0A  return %7B%0A  
+=%3E (%7B%0A
   type: 
@@ -930,31 +930,27 @@
 ,%0A  
- 
- 
 letter%0A
-  
 %7D
+)
 ;%0A
-%7D
 %0Aexport 
 func
@@ -949,16 +949,13 @@
 ort 
-function
+const
  pla
@@ -963,29 +963,23 @@
 Word
+ = 
 (key) 
-%7B%0A  return %7B%0A  
+=%3E (%7B%0A
   ty
@@ -1003,18 +1003,13 @@
 RD,%0A
-  
   key%0A
-  %7D;%0A%7D
+%7D);

Converted action functions to arrow functions