Alert the amount of characters in the current selection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| import React from 'react' | |
| import Events from '../utils/events' | |
| const Sizes = { | |
| SMALL: 1, | |
| MEDIUM: 2, | |
| LARGE: 3 | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fetch from 'node-fetch' | |
| import {zipObject} from 'lodash' | |
| const send = (method, ...args) => subject => subject[method](...args) | |
| const get = prop => object => object[prop] | |
| const log = message => subject => { | |
| console.log(message, subject) | |
| return subject | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Version 1 | |
| droidSpawnRateMultiplierTeamZero 0 | |
| droidSpawnRateMultiplierTeamOne 0 | |
| droidSpawnRateMultiplierTeamNeutral 1 | |
| droidGroupSizeMultiplierTeamZero 0 | |
| droidGroupSizeMultiplierTeamOne 0 | |
| droidGroupSizeMultiplierTeamNeutral 1 | |
| addBotsUpToTeamZero 0 | |
| addBotsUpToTeamOne 0 | |
| aiDifficultyStep 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Version 1 | |
| droidSpawnRateMultiplierTeamZero 1 | |
| droidSpawnRateMultiplierTeamOne 1 | |
| droidSpawnRateMultiplierTeamNeutral 1 | |
| droidGroupSizeMultiplierTeamZero 1 | |
| droidGroupSizeMultiplierTeamOne 1 | |
| droidGroupSizeMultiplierTeamNeutral 1 | |
| addBotsUpToTeamZero 0 | |
| addBotsUpToTeamOne 0 | |
| aiDifficultyStep 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Is it possible to define a type like | |
| type DeepObject = <Leaf>{ [key: string]: Leaf | DeepObject<Leaf> }; | |
| // ^^^ I imagine this could be a way to pass the needed type further | |
| // So I could make a function like | |
| const deepMap = <Leaf, NextLeaf>(deepObject: DeepObject<Leaf>, fn: (value: Leaf) => NextLeaf): DeepObject<NextLeaf> => { | |
| // stuff | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Copyright (c) 2015-present, Facebook, Inc. | |
| * All rights reserved. | |
| * | |
| * This source code is licensed under the BSD-style license found in the | |
| * LICENSE file in the root directory of this source tree. An additional grant | |
| * of patent rights can be found in the PATENTS file in the same directory. | |
| */ | |
| 'use strict'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { Image as NativeImage } from 'react-native'; | |
| /* | |
| Awful but necessary (I think) hack to wait for an image to load. | |
| It looks in the context for "requestTransitionDelay", calls that | |
| (so the parent can keep track of images rendered) and then calls the returned function | |
| when it has laoded (so the parent knows that it is loaded) | |
| */ |