-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1930 lines (1413 loc) · 90.5 KB
/
index.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<HTML>
<HEAD>
<TITLE>Dyn Hiring Challenge</TITLE>
<SCRIPT type="Text/JavaScript">
//Set global variables
var AnswerPhrase = "";
var Sequence = "";
var DEBUG = 0;
//Strip HTML and punctuation from Source Content, store in an Array for choosing specific words.
function ParseContent(ContentID){
var ContentWordLength = {} ; //Object for Key Value Pairs
if (DEBUG > 0) alert("Parse Content for Element: " + ContentID);
var Content = this.document.getElementById(ContentID).innerText;
if (DEBUG > 0) {
alert("Content: " + Content);
alert("Content Length: " + Content.length);
}
//Strip out anything that is not a word character (a-zA-Z0-9_), a space, or a single quote (apostrophe).
ContentCleansed = Content.replace(/[^\w\s']/g,"");
//separate words on one or more space.
ContentWords = ContentCleansed.split(/\s+/);
//IE bugfix
while (ContentWords[0].length < 1 ){
ContentWords.shift();
}
if (DEBUG > 0) {
alert("Words: " + ContentWords);
alert("Word Count: " + ContentWords.length);
alert("Word Lengths: " + Object.keys(ContentWordLength));
//look for empty strings in the cleansed content.
for (i=0;i<ContentWords.length;i++){
if (ContentWordLength[ContentWords[i].length]) {
ContentWordLength[ContentWords[i].length] += "," + ContentWords[i];
} else {
ContentWordLength[ContentWords[i].length] = ContentWords[i];
}
/* if ( ContentWords[i].length < 1 ){
alert("Index " + i + "is blank. " + ContentWords[i-1] + " " + ContentWords[i-1]);
}
*/
}
for (var k in Object.keys(ContentWordLength)) {
alert("Words of Length " + k + " " + ContentWordLength[k]);
}
}
}
//https://en.wikipedia.org/wiki/Fibonacci_number
//https://blog.nraboy.com/2015/01/fibonacci-sequence-printed-javascript/
function fib(n) {
var a = 0, b = 1, f = 1;
AnswerPhrase += " " + ContentWords[f-1];
Sequence += " " + f;
for(var i = 2; i <= n; i++) { //start looping at the second number in the sequence
//add the previous two numbers in the sequence
f = a + b;
//keep track of the sequence as it is calculated.
if (DEBUG > 1) alert("f(" + i + ") = " + f );
Sequence += " " + f;
//Use each fibonacci number to retrieve a word from the Source Content.
AnswerPhrase += " " + ContentWords[f-1]; //Offset by 1 for 0-based array index.
//prepare for the next iteration
a = b;
b = f;
}
//return the fibonacci number for the given input. Can be used if calling the function in a loop.
return f;
};
function ShowAnswer(AnswerID) {
//1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765
if (DEBUG > 1) alert("Show Answer");
this.document.getElementById(AnswerID).innerHTML = Sequence + "<BR>\n";
this.document.getElementById(AnswerID).innerHTML += AnswerPhrase;
}
//Master function to call all individual functions
function Challenge(ContentID,ContentURL,FibNumbers,AnswerID){
// GetContent(ContentID,ContentURL); //Only works online; using copy/paste static content for local.
ParseContent(ContentID);
fib(FibNumbers);
ShowAnswer(AnswerID);
}
</SCRIPT>
</HEAD>
<BODY onload="Challenge('Content','Short Stories by Orson Scott Card - Ender\'s Game.html',20,'Answer');">
<!-- load source content, suppress code to break out of frame -->
<!-- <iframe id="SourceContent" width=100% height=25% sandbox="allow-same-origin allow-scripts allow-popups allow-forms" src="Short Stories by Orson Scott Card - Ender's Game.html"> -->
<!-- Original Source Text to be Parsed.
</iframe>
-->
<DIV id="Challenge">
<UL>
<LI><A target="_new" HREF="http://dyn.com/about/careers/hiring-challenges/">Dyn Hiring Challenge</A>
<UL>
<LI><A target="_new" HREF="http://web.archive.org/web/20111016035323/https://dyn.com/about/careers/hiring-challenges/">(Archived page)</A>
</UL>
<LI><A target="_new" HREF="http://www.hatrack.com/osc/stories/enders-game.shtml">Original Source Content</A>
<LI><A target="_new" HREF="https://kevincantrell.wordpress.com/2011/05/24/hiring-challenge/">Online general solution to Challenge</A>
</UL>
View Source or Inspect the <HEAD> tag to see my solution in JavaScript.<BR>
</DIV>
<H2>Answer</H2>
<div id="Answer">
Calculating Answer...
</div>
<H1>Static Content</H1>
<div id="Content">
<P><HR SIZE=1>
"Whatever your gravity is when you get to the door, remember -- the
enemy's gate is down. If you step through your own door like you're out for a
stroll, you're a big target and you deserve to get hit. With more than a flasher."
Ender Wiggins paused and looked over the group. Most were just watching him
nervously. A few understanding. A few sullen and resisting.
<P> First day with this army, all fresh from the teacher squads, and Ender had
forgotten how young new kids could be. He'd been in it for three years, they'd
had six months -- nobody over nine years old in the whole bunch. But they were
his. At eleven, he was half a year early to be a commander. He'd had a toon of
his own and knew a few tricks, but there were forty in his new army. Green. All
marksmen with a flasher, all in top shape, or they wouldn't be here -- but they
were all just as likely as not to get wiped out first time into battle.
<P> "Remember," he went on, "they can't see you till you get through that door.
But the second you're out, they'll be on you. So hit that door the way you want to
be when they shoot at you. Legs up under you, going straight <EM>down</EM>." He pointed
at a sullen kid who looked like he was only seven, the smallest of them all.
"Which way is down, greenoh!"
<P> "Toward the enemy door." The answer was quick. It was also surly, as if to
say, Yeah, yeah, now get on with the important stuff.
<P> "Name, kid?"
<P> "Bean."
<P> "Get that for size or for brains?"
<P> Bean didn't answer. The rest laughed a little. Ender had chosen right. This
kid <EM>was</EM> younger than the rest, must have been advanced because he was sharp.
The others didn't like him much, they were happy to see him taken down a little.
Like Ender's first commander had taken him down.
<P> "Well, Bean, you're right onto things. Now I tell you this, nobody's gonna
get through that door without a good chance of getting hit. A lot of you are going
to be turned into cement somewhere. Make sure it's your legs. Right? If only
your legs get hit, then only your legs get frozen, and in nullo that's no sweat."
Ender turned to one of the dazed ones. "What're legs for? Hmmm?"
<P> Blank stare. Confusion. Stammer.
<P> "Forget it. Guess I'll have to ask Bean here."
<P> "Legs are for pushing off walls." Still bored.
<P> "Thanks, Bean. Get that, everybody?" They all got it, and didn't like
getting it from Bean. "Right. You can't see with legs, you can't <EM>shoot</EM> with legs,
and most of the time they just get in the way. If they get frozen sticking straight
out you've turned yourself into a blimp. No way to hide. So how do legs go?"
<P> A few answered this time, to prove that Bean wasn't the only one who knew
anything. "Under you. Tucked up under."
<P> "Right. A shield. You're kneeling on a shield, and the shield is your own
legs. And there's a trick to the suits. Even when your legs are flashed you can
<EM>still</EM> kick off. I've never seen anybody do it but me -- but you're all gonna learn
it."
<P> Ender Wiggins turned on his flasher. It glowed faintly green in his hand.
Then he let himself rise in the weightless workout room, pulled his legs under him
as though he were kneeling, and flashed both of them. Immediately his suit
stiffened at the knees and ankles, so that he couldn't bend at all.
<P> "Okay, I'm frozen, see?"
<P> He was floating a meter above them. They all looked up at him, puzzled.
He leaned back and caught one of the handholds on the wall behind him, and
pulled himself flush against the wall.
<P> "I'm stuck at a wall. If I had legs, I'd use legs, and string myself out like a
string <EM>bean</EM>, right?"
<P> They laughed.
<P> "But I don't have legs, and that's <EM>better</EM>, got it? Because of this." Ender
jackknifed at the waist, then straightened out violently, He was across the workout
room in only a moment. From the other side he called to them. "Got that? I
didn't use hands, so I still had use of my flasher. <EM>And</EM> I didn't have my legs
floating five feet behind me. Now watch it again."
<P> He repeated the jackknife, and caught a handhold on the wall near them.
"Now, I don't just want you to do that when they've flashed your legs. I want you
to do that when you've still got legs, because it's better. And because they'll
never be expecting it. All right now, everybody up in the air and kneeling."
<P> Most were up in a few seconds. Ender flashed the stragglers, and they
dangled, helplessly frozen, while the others laughed. "When I give an order, you
move. Got it? When we're at the door and they clear it, I'll be giving you orders
in two seconds, as soon as I see the setup. And when I give the order you better be
out there, because whoever's out there first is going to win, unless he's a fool. I'm
not. And you better not be, or I'll have you back in the teacher squads." He saw
more than a few of them gulp, and the frozen ones looked at him with fear. "You
guys who are hanging there. You watch. You'll thaw out in about fifteen
minutes, and let's see if you can catch up to the others."
<P> For the next half hour Ender had them jackknifing off walls. He called a
stop when he saw that they all had the basic idea. They were a good group,
maybe. They'd get better.
<P> "Now you're warmed up," he said to them, "we'll start working."
<P><CENTER>* * *</CENTER>
<P>Ender was the last one out after practice, since he stayed to help some of the
slower ones improve on technique. They'd had good teachers, but like all armies
they were uneven, and some of them could be a real drawback in battle. Their first
battle might be weeks away. It might be tomorrow. A schedule was never posted.
The commander just woke up and found a note by his bunk, giving him the time of
his battle and the name of his opponent. So for the first while he was going to
drive his boys until they were in top shape -- all of them. Ready for anything, at
any time. Strategy was nice, but it was worth nothing if the soldiers couldn't hold
up under the strain.
<P> He turned the corner into the residence wing and found himself face to face
with Bean, the seven-year-old he had picked on all through practice that day.
Problems. Ender didn't want problems right now.
<P> "Ho, Bean."
<P> "Ho, Ender."
<P> Pause
<P> "Sir," Ender said softly.
<P> "We're not on duty."
<P> "In my army, Bean, we're always on duty." Ender brushed past him.
<P> Bean's high voice piped up behind him. "I know what you're doing, Ender,
sir, and I'm warning you."
<P> Ender turned slowly and looked at him. "Warning me?"
<P> "I'm the best man you've got. But I'd better be treated like it."
<P> "Or what?" Ender smiled menacingly.
<P> "Or I'll be the worst man you've got. One or the other."
<P> "And what do you want? Love and kisses?" Ender was getting angry now.
<P> Bean was unworried. "I want a toon."
<P> Ender walked back to him and stood looking down into his eyes. "I'll give
a toon," he said, "to the boys who prove they're worth something. They've got to
be good soldiers, they've got to know how to take orders, they've got to be able to
think for themselves in a pinch, and they've got to be able to keep respect. That's
how I got to be a commander. That's how you'll get to be a toon leader. Got it?"
<P> Bean smiled. "That's fair. <EM>If</EM> you actually work that way, I'll be a toon
leader in a month."
<P> Ender reached down and grabbed the front of his uniform and shoved him
into the wall. "When I say I work a certain way, Bean, then that's the way I
work."
<P> Bean just smiled. Ender let go of him and walked away, and didn't look
back. He was sure, without looking, that Bean was still watching, still smiling,
still just a little contemptuous. He might make a good toon leader at that. Ender
would keep an eye on him.
<P><CENTER>* * *</CENTER>
<P>Captain Graff, six foot two and a little chubby, stroked his belly as he leaned back
in his chair. Across his desk sat Lieutenant Anderson, who was earnestly pointing
out high points on a chart.
<P> "Here it is, Captain," Anderson said. "Ender's already got them doing a
tactic that's going to throw off everyone who meets it. Doubled their speed."
<P> Graff nodded.
<P> "And you know his test scores. He thinks well, too."
<P> Graff smiled. "All true, all true, Anderson, he's a fine student, shows real
promise."
<P> They waited.
<P> Graff sighed. "So what do you want me to do?"
<P> "Ender's the one. He's got to be."
<P> "He'll never be ready in time, Lieutenant. He's eleven, for heaven's sake,
man, what do you want, a miracle?"
<P> "I want him into battles, every day starting tomorrow. I want him to have a
year's worth of battles in a month."
<P> Graff shook his head. "That would be his army in the hospital."
<P> "No, sir. He's getting them into form. And we need Ender."
<P> "Correction, Lieutenant. We need somebody. You think it's Ender."
<P> "All right, I think it's Ender. Which of the commanders if it isn't him?"
<P> "I don't know, Lieutenant." Graff ran his hands over his slightly fuzzy bald
head. "These are children, Anderson. Do you realize that? Ender's army is nine
years old. Are we going to put them against the older kids? Are we going to put
them through hell for a month like that?"
<P> Lieutenant Anderson leaned even farther over Graff's desk.
<P> "Ender's test scores, Captain!"
<P> "I've seen his bloody test scores! I've watched him in battle, I've listened
to tapes of his training sessions, I've watched his sleep patterns, I've heard tapes
of his conversations in the corridors and in the bathrooms, I'm more aware of
Ender Wiggins that you could possibly imagine! And against all the arguments,
against his obvious qualities, I'm weighing one thing. I have this picture of Ender
a year from now, if you have your way. I see him completely useless, worn down,
a failure, because he was pushed farther than he or any living person could go.
But it doesn't weigh enough, does it, Lieutenant, because there's a war on, and our
best talent is gone, and the biggest battles are ahead. So give Ender a battle every
day this week. And then bring me a report."
<P> Anderson stood and saluted. "Thank you, sir."
<P> He had almost reached the door when Graff called his name. He turned and
faced the captain.
<P> "Anderson," Captain Graff said. "Have you been outside, lately I mean?"
<P> "Not since last leave, six months ago."
<P> "I didn't think so. Not that it makes any difference. But have you ever
been to Beaman Park, there in the city? Hmm? Beautiful park. Trees. Grass. No
mallo, no battles, no worries. Do you know what else there is in Beaman Park?"
<P> "What, sir?" Lieutenant Anderson asked.
<P> "Children," Graff answered.
<P> "Of course children," said Anderson.
<P> "I mean children. I mean kids who get up in the morning when their
mothers call them and they go to school and then in the afternoons they go to
Beaman Park and play. They're happy, they smile a lot, they laugh, they have fun.
Hmmm?"
<P> "I'm sure they do, sir."
<P> "Is that all you can say, Anderson?"
<P> Anderson cleared his throat. "It's good for children to have fun, I think, sir.
I know I did when I was a boy. But right now the world needs soldiers. And this
is the way to get them."
<P> Graff nodded and closed his eyes. "Oh, indeed, you're right, by statistical
proof and by all the important theories, and dammit they work and the system is
right but all the same Ender's older than I am. He's not a child. He's barely a
person."
<P> "If that's true, sir, then at least we all know that Ender is making it possible
for the others of his age to be playing in the park."
<P> "And Jesus died to save all men, of course." Graff sat up and looked at
Anderson almost sadly. "But we're the ones," Graff said, "we're the ones who are
driving in the nails."
<P><CENTER>* * *</CENTER>
<P>Ender Wiggins lay on his bed staring at the ceiling. He never slept more than five
hours a night -- but the lights went off at 2200 and didn't come on again until
0600. So he stared at the ceiling and thought.
<P> He'd had his army for three and a half weeks. Dragon Army. The name
was assigned, and it wasn't a lucky one. Oh, the charts said that about nine years
ago a Dragon Army had done fairly well. But for the next six years the name had
been attached to inferior armies, and finally, because of the superstition that was
beginning to play about the name, Dragon Army was retired. Until now. And
now, Ender thought, smiling, Dragon Army was going to take them by surprise.
<P> The door opened quietly. Ender did not turn his head. Someone stepped
softly into his room, then left with the sound of the door shutting. When soft steps
died away Ender rolled over and saw a white slip of paper lying on the floor. He
reached down and picked it up.
<P> "Dragon Army against Rabbit Army, Ender Wiggins and Carn Carby,
0700."
<P> The first battle. Ender got out of bed and quickly dressed. He went rapidly
to the rooms of each of the toon leaders and told them to rouse their boys. In five
minutes they were all gathered in the corridor, sleepy and slow. Ender spoke
softly.
<P> "First battle, 0700 against Rabbit Army. I've fought them twice before but
they've got a new commander. Never heard of him. They're an older group,
though, and I knew a few of their olds tricks. Now wake up. Run, doublefast,
warmup in workroom three."
<P> For an hour and a half they worked out, with three mock battles and
calisthenics in the corridor out of the nullo. Then for fifteen minutes they all lay
up in the air, totally relaxing in the weightlessness. At 0650 Ender roused them
and they hurried into the corridor. Ender led them down the corridor, running
again, and occasionally leaping to touch a light panel on the ceiling. The boys all
touched the same light panel. And at 0658 they reached their gate to the
battleroom.
<P> The members of toons C and D grabbed the first eight handholds in the
ceiling of the corridor. Toons A, B, and E crouched on the floor. Ender hooked
his feet into two handholds in the middle of the ceiling, so he was out of
everyone's way.
<P> "Which way is the enemy's door?" he hissed.
<P> "Down!" they whispered back, and laughed.
<P> "Flashers on." The boxes in their hands glowed green. They waited for a
few seconds more, and then the gray wall in front of them disappeared and the
battleroom was visible.
<P> Ender sized it up immediately. The familiar open grid of most early games,
like the monkey bars at the park, with seven or eight boxes scattered through the
grid. They called the boxes <EM>stars</EM>. There were enough of them, and in forward
enough positions, that they were worth going for. Ender decided this in a second,
and he hissed, "Spread to near stars. E hold!"
<P> The four groups in the corners plunged through the forcefield at the
doorway and fell down into the battleroom. Before the enemy even appeared
through the opposite gate Ender's army had spread from the door to the nearest
stars.
<P> Then the enemy soldiers came through the door. From their stance Ender
knew they had been in a different gravity, and didn't know enough to disorient
themselves from it. They came through standing up, their entire bodies spread and
defenseless.
<P> "Kill 'em, E!" Ender hissed, and threw himself out the door knees first, with
his flasher between his legs and firing. While Ender's group flew across the room
the rest of Dragon Army lay down a protecting fire, so that E group reached a
forward position with only one boy frozen completely, though they had all lost the
use of their legs -- which didn't impair them in the least. There was a lull as
Ender and his opponent, Carn Carby, assessed their positions. Aside from Rabbit
Army's losses at the gate, there had been few casualties, and both armies were
near full strength. But Carn had no originality -- he was in the four-corner spread
that any five-year-old in the teacher squads might have thought of. And Ender
knew how to defeat it.
<P> He called out, loudly, "E covers A, C down. B, D angle east wall." Under
E toon's cover, B and D toons lunged away from their stars. While they were still
exposed, A and C toons left their stars and drifted toward the near wall. They
reached it together, and together jackknifed off the wall. At double the normal
speed they appeared behind the enemy's stars, and opened fire. In a few seconds
the battle was over, with the enemy almost entirely frozen, including the
commander, and the rest scattered to the corners. For the next five minutes, in
squads of four, Dragon Army cleaned out the dark corners of the battleroom and
shepherded the enemy into the center, where their bodies, frozen at impossible
angles, jostled each other. Then Ender took three of his boys to the enemy gate
and went through the formality of reversing the one-way field by simultaneously
touching a Dragon Army helmet at each corner. Then Ender assembled his army
in vertical files near the knot of frozen Rabbit Army soldiers.
<P> Only three of Dragon Army's soldiers were immobile. Their victory margin
-- 38 to 0 -- was ridiculously high, and Ender began to laugh. Dragon Army
joined him, laughing long and loud. They were still laughing when Lieutenant
Anderson and Lieutenant Morris came in from the teachergate at the south end of
the battleroom.
<P> Lieutenant Anderson kept his face stiff and unsmiling, but Ender saw him
wink as he held out his hand and offered the stiff, formal congratulations that were
ritually given to the victor in the game.
<P> Morris found Carn Carby and unfroze him, and the thirteen-year-old came
and presented himself to Ender, who laughed without malice and held out his
hand. Carn graciously took Ender's hand and bowed his head over it. It was that
or be flashed again.
<P> Lieutenant Anderson dismissed Dragon Army, and they silently left the
battleroom through the enemy's door -- again part of the ritual. A light was
blinking on the north side of the square door, indicating where the gravity was in
that corridor. Ender, leading his soldiers, changed his orientation and went
through the forcefield and into gravity on his feet. His army followed him at a
brisk run back to the workroom. When they got there they formed up into squads,
and Ender hung in the air, watching them.
<P> "Good first battle," he said, which was excuse enough for a cheer, which he
quieted. "Dragon Army did all right against Rabbits. But the enemy isn't always
going to be that bad. And if that had been a good army we would have been
smashed. We still would have won, but we would have been smashed. Now let
me see B and D toons out here. Your takeoff from the stars was way too slow. If
Rabbit Army knew how to aim a flasher, you all would have been frozen solid
before A and C even got to the wall."
<P> They worked out for the rest of the day.
<P> That night Ender went for the first time to the commanders' mess hall. No
one was allowed there until he had won at least one battle, and Ender was the
youngest commander ever to make it. There was no great stir when he came in.
But when some of the other boys saw the Dragon on his breast pocket, they stared
at him openly, and by the time he got his tray and sat at an empty table, the entire
room was silent, with the other commanders watching him. Intensely self-conscious, Ender wondered how they all knew, and why they all looked so hostile.
<P> Then he looked above the door he had just come through. There was a huge
scoreboard across the entire wall. It showed the win/loss record for the
commander of every army; that day's battles were lit in red. Only four of them.
The other three winners had barely made it -- the best of them had only two men
whole and eleven mobile at the end of the game. Dragon Army's score of thirty-eight mobile was embarrassingly better.
<P> Other new commanders had been admitted to the commanders' mess hall
with cheers and congratulations. Other new commanders hadn't won thirty-eight
to zero.
<P> Ender looked for Rabbit Army on the scoreboard. He was surprised to find
that Carn Carby's score to date was eight wins and three losses. Was he that
good? Or had he only fought against inferior armies? Whichever, there was still a
zero in Carn's mobile and whole columns, and Ender looked down from the
scoreboard grinning. No one smiled back, and Ender knew that they were afraid
of him, which meant that they would hate him, which meant that anyone who went
into battle against Dragon Army would be scared and angry and less competent.
Ender looked for Carn Carby in the crowd, and found him not too far away. He
stared at Carby until one of the other boys nudged the Rabbit commander and
pointed to Ender. Ender smiled again and waved slightly. Carby turned red, and
Ender, satisfied, leaned over his dinner and began to eat.
<P><CENTER>* * *</CENTER>
<P>At the end of the week Dragon Army had fought seven battles in seven days. The
score stood 7 wins and 0 losses. Ender had never had more than five boys frozen
in any game. It was no longer possible for the other commanders to ignore Ender.
A few of them sat with him and quietly conversed about game strategies that
Ender's opponents had used. Other much larger groups were talking with the
commanders that Ender had defeated, trying to find out what Ender had done to
beat them.
<P> In the middle of the meal the teacher door opened and the groups fell silent
as Lieutenant Anderson stepped in and looked over the group. When he located
Ender he strode quickly across the room and whispered in Ender's ear. Ender
nodded, finished his glass of water, and left with the lieutenant. On the way out,
Anderson handed a slip of paper to one of the older boys. The room became very
noisy with conversation as Anderson and Ender left.
<P> Ender was escorted down corridors he had never seen before. They didn't
have the blue glow of the soldier corridors. Most were wood paneled, and the
floors were carpeted. The doors were wood, with nameplates on them, and they
stopped at one that said "Captain Graff, supervisor." Anderson knocked softly,
and a low voice said, "Come in."
<P> They went in. Captain Graff was seated behind a desk, his hands folded
across his potbelly. He nodded, and Anderson sat. Ender also sat down. Graff
cleared his throat and spoke.
<P> "Seven days since your first battle, Ender."
<P> Ender did not reply.
<P> "Won seven battles, one every day."
<P> Ender nodded.
<P> "Scores unusually high, too."
<P> Ender blinked.
<P> "Why?" Graff asked him.
<P> Ender glanced at Anderson, and then spoke to the captain behind the desk.
"Two new tactics, sir. Legs doubled up as a shield, so that a flash doesn't
immobilize. Jackknife takeoffs from the walls. Superior strategy, as Lieutenant
Anderson taught, think places, not spaces. Five toons of eight instead of four of
ten. Incompetent opponents. Excellent toon leaders, good soldiers."
<P> Graff looked at Ender without expression. Waiting for what, Ender
wondered. Lieutenant Anderson spoke up.
<P> "Ender, what's the condition of your army?"
<P> Do they want me to ask for relief? Not a chance, he decided. "A little tired,
in peak condition, morale high, learning fast. Anxious for the next battle."
<P> Anderson looked at Graff. Graff shrugged slightly and turned to Ender.
<P> "Is there anything you want to know?"
<P> Ender held his hands loosely in his lap. "When are you going to put us up
against a good army?"
<P> Graff's laughter rang in the room, and when it stopped, Graff handed a
piece of paper to Ender. "Now," the captain said, and Ender read the paper.
"Dragon Army against Leopard Army, Ender Wiggins and Pol Slattery, 2000."
<P> Ender looked up at Captain Graff. "That's ten minutes from now, sir."
<P> Graff smiled. "Better hurry, then, boy."
<P> As Ender left he realized Pol Slattery was the boy who had been handed his
orders as Ender left the mess hall.
<P> He got to his army five minutes later. Three toon leaders were already
undressed and lying naked on their beds. He sent them all flying down the
corridors to rouse their toons, and gathered up their suits himself. When all his
boys were assembled in the corridor, most of them still getting dressed, Ender
spoke to them.
<P> "This one's hot and there's no time. We'll be late to the door, and the
enemy'll be deployed right outside our gate. Ambush, and I've never heard of it
happening before. So we'll take our time at the door. A and B toons, keep your
belts loose, and give your flashers to the leaders and seconds of the other toons."
<P> Puzzled, his soldiers complied. By then all were dressed, and Ender led
them at a trot to the gate. When they reached it the forcefield was already on one-way, and some of his soldiers were panting. They had had one battle that day and
a full workout. They were tired.
<P> Ender stopped at the entrance and looked at the placements of the enemy
soldiers. Some of them were grouped not more than twenty feet out from the gate.
There was no grid, there were no stars. A big empty space. Where were most of
the enemy soldiers? There should have been thirty more.
<P> "They're flat against this wall," Ender said, "where we can't see them."
<P> He took A and B toons and made them kneel, their hands on their hips.
Then he flashed them, so that their bodies were frozen rigid.
<P> "You're shields," Ender said, and then had boys from C and D kneel on
their legs and hook both arms under the frozen boys' belts. Each boy was holding
two flashers. Then Ender and the members of E toon picked up the duos, three at
a time, and threw them out the door.
<P> Of course, the enemy opened fire immediately. But they mainly hit the
boys who were already flashed, and in a few moments pandemonium broke out in
the battleroom. All the soldiers of Leopard Army were easy targets as they lay
pressed flat against the wall or floated, unprotected, in the middle of the
battleroom; and Ender's soldiers, armed with two flashers each, carved them up
easily. Pol Slattery reacted quickly, ordering his men away from the wall, but not
quickly enough -- only a few were able to move, and they were flashed before
they could get a quarter of the way across the battleroom.
<P> When the battle was over Dragon Army had only twelve boys whole, the
lowest score they had ever had. But Ender was satisfied. And during the ritual of
surrender Pol Slattery broke form by shaking hands and asking, "Why did you
wait so long getting out of the gate?"
<P> Ender glanced at Anderson, who was floating nearby. "I was informed
late," he said. "It was an ambush."
<P> Slattery grinned, and gripped Ender's hand again. "Good game."
<P> Ender didn't smile at Anderson this time. He knew that now the games
would be arranged against him, to even up the odds. He didn't like it.
<P><CENTER>* * *</CENTER>
<P>It was 2150, nearly time for lights out, when Ender knocked at the door of the
room shared by Bean and three other soldiers. One of the others opened the door,
then stepped back and held it wide. Ender stood for a moment, then asked if he
could come in. They answered, of course, of course, come in, and he walked to
the upper bunk, where Bean had set down his book and was leaning on one elbow
to look at Ender.
<P> "Bean, can you give me twenty minutes?"
<P> "Near lights out," Bean answered.
<P> "My room," Ender answered. "I'll cover for you."
<P> Bean sat up and slid off his bed. Together he and Ender padded silently
down the corridor to Ender's room. Ender entered first, and Bean closed the door
behind them.
<P> "Sit down," Ender said, and they both sat on the edge of the bed, looking at
each other.
<P> "Remember four weeks ago, Bean? When you told me to make you a toon
leader?"
<P> "Yeah."
<P> "I've made five toon leaders since then, haven't I? And none of them was
you."
<P> Bean look at him calmly.
<P> "Was I right?" Ender asked.
<P> "Yes, sir," Bean answered.
<P> Ender nodded. "How have you done in these battles?"
<P> Bean cocked his head to one side. "I've never been immobilized, sir, and
I've immobilized forty-three of the enemy. I've obeyed orders quickly, and I've
commanded a squad in mop-up and never lost a soldier."
<P> "Then you'll understand this." Ender paused, then decided to back up and
say something else first.
<P> "You know you're early, Bean, by a good half year. I was, too, and I've
been made a commander six months early. Now they've put me into battles after
only three weeks of training with my army. They've given me eight battles in
seven days. I've already had more battles than boys who were made commander
four months ago. I've won more battles than many who've been commanders for
a year. And then tonight. You know what happened tonight."
<P> Bean nodded. "They told you late."
<P> "I don't know what the teachers are doing. But my army is getting tired,
and I'm getting tired, and now they're changing the rules of the game. You see,
Bean, I've looked in the old charts. No one has ever destroyed so many enemies
and kept so many of his own soldiers whole in the history of the game. I'm
unique -- and I'm getting unique treatment.
<P> Bean smiled. "You're the best, Ender."
<P> Ender shook his head. "Maybe. But it was no accident that I got the
soldiers I got. My worst soldier could be a toon leader in another army. I've got
the best. They've loaded things my way -- but now they're loading it all against
me. I don't know why. But I know I have to be ready for it. I need your help."
<P> "Why mine?"
<P> "Because even though there are some better soldiers than you in Dragon
Army -- not many, but some -- there's nobody who can think better and faster
than you." Bean said nothing. They both knew it was true.
<P> Ender continued. "I need to be ready, but I can't retrain the whole army.
So I'm going to cut every toon down by one, including you. With four others
you'll be a special squad under me. And you'll learn to do some new things.
Most of the time you'll be in the regular toons just like you are now. But when I
need you. See?"
<P> Bean smiled and nodded. "That's right, that's good, can I pick them
myself?"
<P> "One from each toon except your own, and you can't take any toon
leaders."
<P> "What do you want us to do?"
<P> "Bean, I don't know. I don't know what they'll throw at us. What would
you do if suddenly our flashers didn't work, and the enemy's did? What would
you do if we had to face two armies at once? The only thing I know is -- there
may be a game where we don't even try for score. Where we just go for the
enemy's gate. I want you ready to do that any time I call for it. Got it? You take
them for two hours a day during regular workout. Then you and I and your
soldiers, we'll work at night after dinner."
<P> "We'll get tired."
<P> "I have a feeling we don't know what tired is." Ender reached out and took
Bean's hand, and gripped it. "Even when it's rigged against us, Bean. We'll
win."
<P> Bean left in silence and padded down the corridor.
<P><CENTER>* * *</CENTER>
<P>Dragon Army wasn't the only army working out after hours now. The other
commanders had finally realized they had some catching up to do. From earlymorning to lights out soldiers all over Training and Command Center, none of
them over fourteen years old, were learning to jackknife off walls and use each
other as shields.
<P> But while other commanders mastered the techniques that Ender had used to
defeat them, Ender and Bean worked on solutions to problems that had never
come up.
<P> There were still battles every day, but for a while they were normal, with
grids and stars and sudden plunges through the gate. And after the battles, Ender
and Bean and four other soldiers would leave the main group and practice strange
maneuvers. Attacks without flashers, using feet to physically disarm or disorient
an enemy. Using four frozen soldiers to reverse the enemy's gate in less than two
seconds. And one day Bean came in workout with a 30-meter cord.
<P> "What's that for?"
<P> "I don't know yet." Absently Bean spun one end of the cord. It wasn't
more than an eighth of an inch thick, but it would have lifted ten adults without
breaking.
<P> "Where did you get it?"
<P> "Commissary. They asked what for. I said to practice tying knots."
<P> Bean tied a loop in the end of the rope and slid it over his shoulders.
<P> "Here, you two, hang on to the wall here. Now don't let go of the rope.
Give me about twenty meters of slack." They complied, and Bean moved about ten
feet from them along the wall. As soon as he was sure they were ready, he
jackknifed off the wall and flew straight out, fifty yards. Then the rope snapped
taut. It was so fine that it was virtually invisible, but it was strong enough to force
Bean to veer off at almost a right angle. It happened so suddenly that he had
inscribed a perfect arc and hit the wall hard before most of the other soldiers knew
what had happened. Bean did a perfect rebound and drifted quickly back to where
Ender and the others waited for him.
<P> Many of the soldiers in the five regular squads hadn't noticed the rope, and
were demanding to know how it was done. It was impossible to change direction
that abruptly in nullo. Bean just laughed.
<P> "Wait till the next game without a grid! They'll never know what hit them."
<P> They never did. The next game was only two hours later, but Bean and two
others had become pretty good at aiming and shooting while they flew at
ridiculous speeds at the end of the rope. The slip of paper was delivered, and
Dragon Army trotted off to the gate, to battle with Griffin Army. Bean coiled the
rope all the way.
<P> When the gate opened, all they could see was a large brown star only fifteen
feet away, completely blocking their view of the enemy's gate.
<P> Ender didn't pause. "Bean, give yourself fifty feet of rope and go around
the star." Bean and his four soldiers dropped through the gate and in a moment
Bean was launched sideways away from the star. The rope snapped taut, and Bean
flew forward. As the rope was stopped by each edge of the star in turn, his arc
became tighter and his speed greater, until when he hit the wall only a few feet
away from the gate he was barely able to control his rebound to end up behind the
star. But he immediately moved all his arms and legs so that those waiting inside
the gate would know that the enemy hadn't flashed him anywhere.
<P> Ender dropped through the gate, and Bean quickly told him how Griffin
Army was situated. "They've got two squares of stars, all the away around the
gate. All their soldiers are under cover, and there's no way to hit any of them until
we're clear to the bottom wall. Even with shields, we'd get there at half strength
and we wouldn't have a chance."
<P> "They moving?" Ender asked.
<P> "Do they need to?"
<P> "I would." Ender thought for a moment. "This one's tough. We'll go for
the gate, Bean."
<P> Griffin Army began to call out to them.
<P> "Hey, is anybody there?"
<P> "Wake up, there's a war on!"
<P> "We wanna join the picnic!"
<P> They were still calling when Ender's army came out from behind their star
with a shield of fourteen frozen soldiers. William Bee, Griffin Army's
commander, waited patiently as the screen approached, his men waiting at the
fringes of their stars for the moment when whatever was behind the screen became
visible. About ten yards away the screen suddenly exploded as the soldiers behind
it shoved the screen north. The momentum carried them south twice as fast, and at
the same moment the rest of Dragon Army burst from behind their star at the
opposite end of the room, firing rapidly.
<P> William Bee's boys joined battle immediately, of course, but William Bee
was far more interested in what had been left behind when the shield disappeared.
A formation of four frozen Dragon Army soldiers were moving headfirst toward
the Griffin Army gate, held together by another frozen soldier whose feet and
hands were hooked through their belts. A sixth soldier hung to the waist and
trailed like the tail of a kite. Griffin Army was winning the battle easily, and
William Bee concentrated on the formation as it approached the gate. Suddenly
the soldier trailing in back moved -- he wasn't frozen at all! And even though
William Bee flashed him immediately, the damage was done. The format drifted
in the Griffin Army gate, and their helmets touched all four corners
simultaneously. A buzzer sounded, the gate reversed, and the frozen soldiers in
the middle were carried by momentum right through the gate. All the flashers
stopped working, and the game was over.
<P> The teachergate opened and Lieutenant Anderson came in. Anderson
stopped himself with a slight movement of his hands when he reached the center
of the battleroom. "Ender," he called, breaking protocol. One of the frozen
Dragon soldiers near the south wall tried to call through jaws that were clamped
shut by the suit. Anderson drifted to him and unfroze him.
<P> Ender was smiling.
<P> "I beat you again, sir," Ender said.
<P> Anderson didn't smile. "That's nonsense, Ender," Anderson said softly.
"Your battle was with William Bee of Griffin Army."
<P> Ender raised an eyebrow.
<P> "After that maneuver," Anderson said, "the rules are being revised to
require that all of the enemy's soldiers must be immobilized before the gate can be
reversed."
<P> "That's all right," Ender said. "It could only work once anyway."
Anderson nodded, and was turning away when Ender added, "Is there going to be
a new rule that armies be given equal positions to fight from?"
<P> Anderson turned back around. "If you're in one of the positions, Ender, you
can hardly call them equal, whatever they are."
<P> William Bee counted carefully and wondered how in the world he had lost
when not one of his soldiers had been flashed and only four of Ender's soldiers
were even mobile.
<P> And that night as Ender came into the commanders' mess hall, he was
greeted with applause and cheers, and his table was crowded with respectful
commanders, many of them two or three years older than he was. He was
friendly, but while he ate he wondered what the teachers would do to him in his
next battle. He didn't need to worry. His next two battles were easy victories, and
after that he never saw the battleroom again.
<P><CENTER>* * *</CENTER>
<P>It was 2100 and Ender was a little irritated to hear someone knock at his door. His
army was exhausted, and he had ordered them all to be in bed after 2030. The last
two days had been regular battles, and Ender was expecting the worst in the
morning.
<P> It was Bean. He came in sheepishly, and saluted.
<P> Ender returned his salute and snapped, "Bean, I wanted everybody in bed."
<P> Bean nodded but didn't leave. Ender considered ordering him out. But as
he looked at Bean, it occurred to him for the first time in weeks just how young
Bean was. He had turned eight a week before, and he was still small and -- no,
Ender thought, he wasn't young. Nobody was young. Bean had been in battle,
and with a whole army depending on him he had come through and won. And
even though he was small, Ender could never think of him as young again.
<P> Ender shrugged and Bean came over and sat on the edge of the bed. The
younger boy looked at his hands for a while, and finally Ender grew impatient and
asked, "Well, what is it?"
<P> "I'm transferred. Got orders just a few minutes ago."
<P> Ender closed his eyes for a moment. "I knew they'd pull something new.
Now they're taking -- where are you going?"
<P> "Rabbit Army."
<P> "How can they put you under an idiot like Carn Carby!"
<P> "Carn was graduated. Support squad."
<P> Ender looked up. "Well, who's commanding Rabbit then?"
<P> Ben held his hands out helplessly.
<P> "Me," he said.
<P> Ender nodded, and the smiled. "Of course. After all, you're only four years
younger than the regular age."
<P> "It isn't funny," Bean said. "I don't know what's going on here. First all
the changes in the game. And now this. I wasn't the only one transferred, either,
Ender. Ren, Peder, Brian, Wins, Younger. All commanders now."
<P> Ender stood up angrily and strode to the wall. "Every damn toon leader I've
got!" he said, and whirled to face Bean. "If they're going to break up my army,
Bean, why did they bother making me a commander at all?"
<P> Bean shook his head. "I don't know. You're the best, Ender. Nobody's
ever done what you've done. Nineteen battles in fifteen days, sir, and you won
every one of them, no matter what they did to you."
<P> "And now you and the other are commanders. You know every trick I've
got, I trained you, and who am I supposed to replace you with? Are they going to
stick me with six greenohs?"
<P> "It stinks, Ender, but you know that if they gave you five crippled midgets
and armed you with a roll of toilet paper you'd win."
<P> They both laughed, and then they noticed that the door was open.
<P> Lieutenant Anderson stepped in. He was followed by Captain Graff.