erratic-gate/src/modules/saving/templates/incrementor.ts
2019-08-04 02:45:00 +03:00

27 lines
656 B
TypeScript

import { PartialTemplate } from '../types/PartialTemplate'
import { categories } from '../data/categories'
/**
* The template of the increment gate
*/
const incrementorTemplate: PartialTemplate = {
metadata: {
name: 'incrementor'
},
material: {
type: 'image',
fill: require('../../../assets/incrementor')
},
code: {
activation: `
const a = context.getBinary(0)
context.setBinary(0, a + 1)`
},
info: [
'https://algassert.com/circuits/2015/06/12/Constructing-Large-Increment-Gates.html'
],
category: categories.math
}
export default incrementorTemplate