Skip to content

Instantly share code, notes, and snippets.

View vViktorPL's full-sized avatar

Wiktor Toporek vViktorPL

View GitHub Profile
@vViktorPL
vViktorPL / advanced-typescript-form.tsx
Last active November 5, 2020 12:20
Advanced TypeScript - form
import * as React from 'react';
import { Controller, useForm, UseFormMethods } from 'react-hook-form'
import { Form, Input, InputNumber } from 'antd'
import { InputProps } from 'antd/es/input'
export type FormInputProps<FormValues, AsProps, Name> = {
name: Name;
form: UseFormMethods<FormValues>;
as: React.JSXElementConstructor<AsProps>;
} & Omit<AsProps, "form">;
@vViktorPL
vViktorPL / robot.js
Created December 5, 2012 17:03
VOBOT v1.2
var myData = [];
var enemyData = [];
var Robot = function(robot) {
//lol69
};
Robot.prototype.onIdle = function(ev) {
var robot=ev.robot;
@vViktorPL
vViktorPL / robot.js
Created December 5, 2012 16:48
VOBOT v2.0
var myData = [];
var enemyData = [];
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot=ev.robot;
@vViktorPL
vViktorPL / robot.js
Created December 4, 2012 12:48
vobot
function Robot(robot) {}
// well, we need to do something...
// whenever our robot is idle, this method gets called.
Robot.prototype.onIdle = function(ev) {
var robot;
robot = ev.robot;
robot.ahead(150);
robot.rotateCannon(360);
robot.back(100);
@vViktorPL
vViktorPL / robot.js
Created December 4, 2012 12:48
vobot
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
@vViktorPL
vViktorPL / robot.js
Created December 4, 2012 12:48
vobot
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);