Deepseek ArtifactsDeepseek Artifacts

Match & Win 游戏概念

4.0
en
游戏开发
卡牌游戏
网页游戏
积分兑换
游戏开发
Bubble.io

Prompt

App Concept: "Match & Win" Card Game**

**Core Idea:**  
A web-based memory-matching game where users flip cards to find triple matches and earn redeemable points. Players pay $0.5 per game round (or use daily free plays) with a 30% house edge.

---

### **Key Features**

1. **Game Mechanics**  
   - 12 cards with 4 sets of 3 identical symbols (e.g., 🍎🍌🍊🍇).  
   - Users flip 3 cards/attempt.  
   - Match 3 identical symbols → Win points (70% of entry fees).  

2. **Points System**  
   - 100 points = $1 redeemable.  
   - Minimum withdrawal: $5 (500 points).  

3. **Monetization**  
   - Entry fee: $0.5 per play (converted to points).  
   - Daily free play via rewarded ads/tasks.  

4. **Payment Integration**  
   - Deposit: ZainCash, AsiaCell, Visa/Mastercard.  
   - Withdrawal: Manual approval via admin panel.  

---

### **Bubble.io Implementation Guide**

#### A. **Data Types**  
1. **User**  
   - Email (unique)  
   - Password  
   - Points (number)  
   - LastFreePlay (date)  

2. **Card**  
   - Symbol (text)  
   - IsFlipped (yes/no)  
   - Position (number 1-12)  
   - User (User)  

3. **Reward**  
   - Symbol (text)  
   - Points (number)  

---

#### B. **Workflows**  
1. **Game Initialization**  
   - On app load → Generate 12 random cards with 3x duplicates.  

2. **Card Flipping**  
   - When user clicks card →  
     a. Reveal symbol (update `IsFlipped=yes`)  
     b. Count flipped cards  
     c. After 3 flips → Check match  

3. **Win/Lose Logic**  
   - If 3 symbols match →  
     a. Add points: `User:points + Reward:points`  
     b. Reset cards  

4. **Daily Free Play**  
   - CRON job → Reset `LastFreePlay` daily.  

---

#### C. **UI Elements**  
1. **Main Game Screen**  
   - 12-card grid (3x4 layout)  
   - Points counter (dynamic text)  
   - "Play Now" button ($0.5)  
   - "Free Play" button (conditional visibility)  

2. **Admin Panel**  
   - Manual withdrawal approval  
   - Edit reward point values  

---

### **Payment Setup Tips**  
1. Use **Stripe/PayPal Plugin** for card payments.  
2. For ZainCash/AsiaCell → Use manual approval flow:  
   - User submits withdrawal request →  
   - Admin confirms via mobile money →  
   - Deduct points.  

---

### **Recommended Plugins**  
1. **Toolbox** (for animations)  
2. **Stripe API** (card payments)  
3. **Scheduler** (daily free play reset)  

---

### **Legal Note**  
Add disclaimer: *"This game requires skill in memory and pattern recognition"* to avoid gambling classification.

Generated Result

import React, { useState, useEffect } from 'react';

const App = () => {
  const [cards, setCards] = useState([]);
  const [flippedCards, setFlippedCards] = useState([]);
  const [points, setPoints] = useState(0);
  const [gameStarted, setGameStarted] = useState(false);

  const initializeGame = () => {
    const symbols = ['🍎', '🍌', '🍊', '🍇'];
    const deck = symbols.flatMap(symbol => Array(3).fill(symbol)).sort(() => Math.random() - 0.5);
    setCards(deck.map((symbol, index) => ({ id: index, symbol, isFlipped: false })));
    setFlippedCards([]);
    setGameStarted(true);
  };

  const handleCardClick = (index) => {
    if (flippedCards.length < 3 && !cards[index].isFlipped) {
      const newCards = [...cards];
      newCards[index].isFlipped = true;
      setCards(newCards);
      setFlippedCards([...flippedCards, newCards[index]]);

      if (flippedCards.length === 2) {
        checkForMatch([...flippedCards, newCards[index]]);
      }
    }
  };

  const checkForMatch = (selectedCards) => {
    setTimeout(() => {
      if (new Set(selectedCards.map(card => card.symbol)).size === 1) {
        setPoints(points + 35); // 70% of $0.5 is 35 points
      }
      resetCards();
    }, 1000);
  };

  const resetCards = () => {
    const newCards = cards.map(card => ({ ...card, isFlipped: false }));
    setCards(newCards);
    setFlippedCards([]);
  };

  return (
    <div className="min-h-screen bg-gradient-to-b from-blue-500 to-purple-600 text-white">
      <div className="container mx-auto p-4">
        <h1 className="text-4xl font-bold text-center mb-8">Match & Win</h1>
        <div className="grid grid-cols-3 gap-4 mb-8">
          {cards.map((card, index) => (
            <div
              key={card.id}
              className="flex items-center justify-center h-24 bg-white text-4xl rounded-lg shadow-lg cursor-pointer transform transition-transform hover:scale-105"
              onClick={() => handleCardClick(index)}
            >
              {card.isFlipped ? card.symbol : '?'}
            </div>
          ))}
        </div>
        <div className="text-center mb-8">
          <p className="text-2xl">Points: {points}</p>
        </div>
        <div className="text-center">
          {!gameStarted && (
            <button
              className="bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded-full transition duration-300"
              onClick={initializeGame}
            >
              Start Game
            </button>
          )}
        </div>
      </div>
      <div className="text-center text-sm mt-8">
        <p>Legal Note: This game requires skill in memory and pattern recognition.</p>
        <p>© 2025 Match & Win. All rights reserved.</p>
      </div>
    </div>
  );
};

export default App;

More Recommendations

View All