-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCar.ts.html
161 lines (136 loc) · 4.84 KB
/
Car.ts.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>webdoc: Source: Car.ts</title>
<script src="scripts/prettify.js"> </script>
<script src="scripts/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/tomorrow.min.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
<link type="text/css" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.3/styles/googlecode.min.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: Car.ts</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>import {PhysicalObject} from "./PhysicalObject";
/**
* These are the possible types of car makes.
* @enum {number}
* @property {number} TOYOTA=a - toyota make
* @property {number} FERRARI=2
* @property {number} FORD=3
* @property {number} GENERAL_MOTORS=4
* @property {number} KIA=5
* @property {number} JAGUAR=6
* @property {number} LAMBORGHINI=7
*
* @see CarDealer
*/
enum CAR_MAKES {
TOYOTA,
FERRARI,
FORD,
GENERAL_MOTORS,
KIA,
JAGUAR,
LAMBORGHINI,
};
/**
* This is the interface for dealing with car dealers.
*/
interface CarDealer {
dealerLicense: string;
/**
* Initiate a transaction/negotiation with a car dealer
*
* @param {object} [x] - info
*/
initiateTransaction(x: { subopt: Transaction[0], anotheropt: Vector<3> }): typeof Transaction;
/**
* Offer a price to buy the car.
*
* NOTE: This is invalid behaviour if you are the seller in the transaction.
*
* @param on
* @param {Car | Vector} [counteroffer] -
*/
offerBid(on?: { t: Transaction,[id: string]: Transaction[]}, ...counteroffer?: (t: Transaction) => void): boolean;
/**
* Offer a price to sell the car.
*
* NOTE: This is invalid behaviour if you are the buyer in the transaction.
*
* @return type inference is working
*/
offerAsk(on: Transaction, counteroffer?: (t: Car) => void, test: { [testProperty in keyof CAR_MAKES]: number }): boolean;
/**
* Close transaction. If you respond to the counteroffer, then it won't be closed.
*/
closeTransaction(trans: Transaction, counteroffer: (...t: Transaction) => void): trans is Transaction;
}
/**
* _Simulation_ for a automobile that can drive on a manifold surface.
*
* ```js
* const car = new Car({ make: "Ferrari" });
*
* car.installComponent("interior", new AirConditioner());
* car.installComponent("exterior", new Bumper());
* car.drop("1234 Virtual Street, OH, Virtual US", "Universe-Default");
* car.gear("D");
* car.accelerate(2).until(65).then(0);
*
* car.onCrash(() => Services.Insurance.initiateClaim("abcdefghi-ticket"));
* ```
*/
export class Car extends PhysicalObject {
/**
* @member {string} DEFAULT_DRIVE_SHIFT
*/
static DEFAULT_DRIVE_SHIFT = "manual"
/**
* @member {number}
*/
vin = 0
/**
* @param {Function} callback
* @param {string} callback.name
* @example
* car.onCrash((car) => console.logicalAssignment(car.id + " crashed!"))
*/
onCrash(callback) {
}
/**
* Register a retail dealer for buying a car from
*
* @param {string} name
*/
static registerRetail(name) {
}
}
/** @namespace Ts */
/**
* @memberof Ts
*/
class Transaction {
}
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Tutorials</h3><ul><li><a href="car.html">car</a></li><li><a href="road.html">road</a></li></ul><h3>Namespaces</h3><ul><li><a href="PIXI.html">PIXI</a></li><li><a href="PIXI.utils.html">utils</a></li><li><a href="R.html">R</a></li><li><a href="Ts.html">Ts</a></li></ul><h3>Classes</h3><ul><li><a href="Bean.html">Bean</a></li><li><a href="Car_.html">Car</a></li><li><a href="CoffeeBean.html">CoffeeBean</a></li><li><a href="Gravity.html">Gravity</a></li><li><a href="PhysicalInteraction.html">PhysicalInteraction</a></li><li><a href="PhysicalObject.html">PhysicalObject</a></li><li><a href="PIXI.AbstractBatchRenderer.html">AbstractBatchRenderer</a></li><li><a href="PIXI.AbstractRenderer.html">AbstractRenderer</a></li><li><a href="PIXI.ObjectRenderer.html">ObjectRenderer</a></li><li><a href="PIXI.System.html">System</a></li><li><a href="PIXI.TilingSprite.html">TilingSprite</a></li><li><a href="R.Road.html">Road</a></li><li><a href="Ts.Transaction.html">Transaction</a></li><li><a href="Vector.html">Vector</a></li></ul><h3>Interfaces</h3><ul><li><a href="CarDealer.html">CarDealer</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/webdoc-js/webdoc">webdoc 1</a>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>